Go to file
2026-02-09 09:24:50 +09:00
bench optimize rendering 2026-02-09 09:24:50 +09:00
font add emoji font. 2025-12-28 19:50:38 +09:00
gtk fix gtk Makefile 2025-12-24 00:11:41 +09:00
map vietnamese telex input 2026-02-09 09:24:50 +09:00
xim add Makefile to xim/xcb-util 2025-12-23 22:09:36 +09:00
.gitignore add map (from 9front) 2025-12-23 22:14:06 +09:00
bench.sh add bench 2026-02-09 09:24:50 +09:00
dat.h optimize rendering 2026-02-09 09:24:50 +09:00
dict.c rename hnode fields, functions. 2026-02-08 16:29:29 +09:00
fn.h vietnamese telex input 2026-02-09 09:24:50 +09:00
font.c optimize rendering 2026-02-09 09:24:50 +09:00
hash.c rename hnode fields, functions. 2026-02-08 16:29:29 +09:00
ipc.h first commit 2025-12-23 20:21:56 +09:00
ko.c add lang dispatch, korean hangul input 2026-02-09 09:24:45 +09:00
main.c optimize rendering 2026-02-09 09:24:50 +09:00
Makefile add bench 2026-02-09 09:24:50 +09:00
README.md update readme 2026-01-13 09:25:22 +09:00
run.sh add emoji font. 2025-12-28 19:50:38 +09:00
srv.c first commit 2025-12-23 20:21:56 +09:00
stb_truetype.h first commit 2025-12-23 20:21:56 +09:00
str.c first commit 2025-12-23 20:21:56 +09:00
strans.c optimize rendering 2026-02-09 09:24:50 +09:00
trie.c use trie for map lookup 2026-02-08 16:36:59 +09:00
vi.c vietnamese telex input 2026-02-09 09:24:50 +09:00
win.c optimize rendering 2026-02-09 09:24:50 +09:00

strans

An input method daemon for CJK text entry on X11.

Inspired by 9front's ktrans. Threads communicate via CSP channels.

Dependencies

  • plan9port
  • gtk+-3.0 (optional, for GTK IM module)

Build

make
cd xim && make                          # XIM adapter
cd gtk && make docker && make install   # GTK IM module

Run

./strans map font &

For XIM apps:

./xim/strans-xim &
XMODIFIERS=@im=strans xterm

For GTK apps:

GTK_IM_MODULE=strans gedit

Usage

Switch input modes with Ctrl + key:

N  Hiragana
K  Katakana
S  Hangul
T  English
V  Vietnamese (Telex)
E  Emoji

Type romanized input. Select candidates with 1-9 or arrow keys. Tab or Enter to commit.

Architecture

Four threads communicate via CSP channels:

Adapters (strans-xim, im-strans.so) bridge X11/GTK events.

Files

strans.c    input method engine
dict.c      dictionary queries
win.c       xcb window management
font.c      truetype rendering (stb_truetype)
map/        transliteration tables
font/       bundled CJK fonts

References