This is reimplement of PIME's 喵喵輸入法 by using NIME.
The chi.ico
, icon.ico
and ime.json
are copied from PIME's 喵喵輸入法. These are under LGPL 2.0 License.
NIME is under MIT License.
- nodejs 6.x 32bit
- Install node-gyp dependecise for c binding through node-ffi. Please see node-gyp document to setup your environment.
node index.js
It is the reduce-based implement. It uses the textReducer
and response
function to handle text and request.
'use strict';
let NIME = require('nime');
// It would pass the client request and previous state that you define.
// The default state is
// { env:
// { id: '{c5f37da0-274e-4837-9b7c-9bb79fe85d9d}',
// isWindows8Above: false,
// isMetroApp: false,
// isUiLess: false,
// isConsole: false,
// isKeyboardOpen: true
// }
// }
function textReducer(request, preState) {
return preState;
}
// You can define your response information.
function response(request, state) {
return {success: true, seqNum: request['seqNum']};
}
let server = NIME.createServer([{
'guid': '123', // Your ime's guid, it also write in the ime.json
'textService': {
textReducer,
response
}
}]);
server.listen();