This is an old revision of the document!


Input method in FreeBSD virtual terminal (Week3)

Date: 06/20-06/26

In this week, I continued to read the source code of tmux-fingers to see how it initializes the finger-mode, then I could utilize the code to implement my rime mode.

My origin idea is:

  • tmux_rime.sh: rime mode script, responsible for initializing rime mode, drawing status bar, inserting text in tmux
  • binding.sh: bind commands to keys and sent to the named pipe between with tmux-rime.sh
  • client.py: called by tmux_rime.sh to request the server for current rime state and text that will be inserted
  • server.py: interact with low-level rime library and send the results to client.py via socket

But later I found it's inefficient for inputting since almost all of keys must to process by the low-level rime library, that is, librime. Since they must be passed to tmux_rime.sh first, and client.py next. So, why do not send to client.py directly?

Here is my new idea:

  • tmux_rime.sh: rime mode script, responsible for initializing rime mode, drawing status bar, inserting text in tmux
  • binding.sh: bind commands to keys and call client.py with arguments
  • client.py: called by binding.sh and request the server for the current rime state and text that will be inserted, and send back the data via named pipe between with `tmux_rime.sh
  • server.py: interact with low-level rime library and send the results to client.py via socket
  • summerofcode2021projects/inputmethodinfreebsdvirtualterminal/week3.1625907477.txt.gz
  • Last modified: 2021/07/10 08:57
  • by FanChung