====== Input method in FreeBSD virtual terminal ====== * Student: [[/FanChung|FanChung]] * Mentor: [[/LiWenHsu|LiWenHsu]] and [[/PhilipPaeps|PhilipPaeps]] Table of contents: ===== Screenshot ===== {{summerofcode2021projects/inputmethodinfreebsdvirtualterminal/vt_ime_screenshot.png?600}} ===== Project Description ===== This project aims to provide an environment that can run IME (input method engine) to enable users to type CJK characters in ''%%vt(4)%%''. This project was divided into two parts, backend and frontend. The backend is supposed to process keys sent from the frontend and translate them into valid CJK characters, depending on different input schemas. The frontend, on the other hand, recieves utf-8 encoded CJK characters and insert them on the screen. Additionally, the frontend need to print preedit string and candidates during composing. ===== Deliverables ===== * **Backend**: An IME API server for communicating with the IME library * Use //librime// as the input method engine library to translate keys into valid CJK characters. * Create APIs for accessing the IME library functions. * Provide extra features like schema selection, data deployment and data synchronization. * **Frontend**: A graphical frontend for showing the current input status and characters/words candidates. * First stage: Implement the frontend in ''%%tmux%%''. * Design an IME client for interacting with the backend IME API server. * Display IME components on the ''%%tmux%%'' status bar. * Final stage: Implement the frontend in ''%%vt(4)%%''. * Handle keys in kernel and send them to the backend. * Display IME components on the screen. ===== Weekly Reports ===== | Date | Week || | 06/07-06/19 | [[SummerOfCode2021Projects/InputMethodInFreeBSDVirtualTerminal/Week1&2|Week 1 & Week2]] || | 06/20-06/26 | [[SummerOfCode2021Projects/InputMethodInFreeBSDVirtualTerminal/Week3|Week 3]] || | 06/27-07/04 | [[SummerOfCode2021Projects/InputMethodInFreeBSDVirtualTerminal/Week4|Week 4]] || | 07/05-07/11 | [[SummerOfCode2021Projects/InputMethodInFreeBSDVirtualTerminal/Week5|Week 5]] || | 07/12-07/18 | [[SummerOfCode2021Projects/InputMethodInFreeBSDVirtualTerminal/Week6|Week 6]] || | 07/19-07/25 | [[SummerOfCode2021Projects/InputMethodInFreeBSDVirtualTerminal/Week7|Week 7]] || | 07/26-08/01 | [[SummerOfCode2021Projects/InputMethodInFreeBSDVirtualTerminal/Week8|Week 8]] || | 08/02-08/15 | [[SummerOfCode2021Projects/InputMethodInFreeBSDVirtualTerminal/Week9&10|Week 9 & Week 10]] || | 08/16-08/22 | [[SummerOfCode2021Projects/InputMethodInFreeBSDVirtualTerminal/FinalSummary|Week 11 (Final Summary)]] || ===== Code ===== * Tmux-rime: https://github.com/Cycatz/tmux-rime * Cloned source code: https://github.com/Cycatz/freebsd-src * Project resources: https://github.com/Cycatz/GSoC2021 ===== Notes ===== * Notes: https://gitlab.com/Cycatz/gsoc-notes ===== Usage ===== - Set up the kernel patch (branch vt-ime): https://github.com/Cycatz/freebsd-src/tree/vt-ime - Set up the backend: https://github.com/Cycatz/tmux-rime/blob/vt-rime/README.org - Fire up the vt console and set the console font to b16.hex in [[https://github.com/emaste/fontstuff|fontstuff]] for displaying CJK characters correctly - Press right ctrl key to toggle IME mode - Press keys to compose CJK chars/words and use ''%%Space%%'' to commit the preedit string (Currently only support the input scheme //[[https://en.wikipedia.org/wiki/Bopomofo|Bopomofo]]//)