ibus有個問題,當它從環境變數判斷中文模式時,
如果沒有正確的值,會使用預設值,而預設值是簡體中文 (棍)
比方你想使用英文桌面搭配中文輸入法時就會遇到這個問題,
或是你的環境變數沒設好,也會遇到打不出倉頡的字或變亂碼
定義及要修改的地方在這裡
/usr/share/ibus-table/engine/table.py
裡面有註解, 0是簡中, 1是繁中,
# self._chinese_mode: the candidate filter mode,
# 0 is simplify Chinese
# 1 is traditional Chinese
# 2 is Big charset mode, but simplify Chinese first
# 3 is Big charset mode, but traditional Chinese first
# 4 is Big charset mode.
# we use LC_CTYPE or LANG to determine which one to use
line 124: 可以搜尋if IME declare as Chinese IME找到那段code
if self.db._is_chinese:
# if IME declare as Chinese IME
return 1
else:
return -1
把原本的0改成1, 再把 ibus-daemon kill重啟 就OK囉~
# sudo pkill ibus-daemon && ibus-daemon -d
Ref: 改變ibus倉頡五代預設語系 (簡->繁)