Fcitx5 input method framework ported to JavaScript with WebAssembly.
The project provides an npm package fcitx5-js.tgz, which powers derivative apps for end user.
| Derivative | Note |
|---|---|
| Fcitx5 Online | Preview |
| Fcitx5 Chrome |
Fcitx5 JS can be built on Linux, macOS and WSL.
You may use nvm to install node.
npm i -g pnpm
pnpm i
pnpm --prefix=fcitx5-keyboard-web i
pnpm --prefix=fcitx5-keyboard-web run build
pnpm --prefix=fcitx5-webview i
./scripts/install-deps.shhttps://emscripten.org/docs/getting_started/downloads.html
emcmake cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
EMCC_FORCE_STDLIBS=libc++ FCITX_DISTRIBUTION=fcitx5-js cmake --build buildYou can also use Ctrl+Shift+B (or Cmd+Shift+B on macOS) in VSCode to execute a task.
npx serve -l 9000 -S previewSee interface FCITX in Fcitx5.d.ts for a list of JS APIs.
They are methods of globalThis.fcitx object.
npm pack