librime
librime copied to clipboard
key_binder 能否支持 `ascii_composer/switch_key` 的行为
key_binder 的 toggle 支持 ascii_mode 选项,但是它是直接清空当前输入的内容切换到英文模式。而 ascii_composer/switch_key 的 commit_code 可以保留当前输入的字符序列。另一方面,switch_key 不支持修饰符和一个按键以上的绑定。
希望能够支持如下配置:
"key_binder/bindings":
- {accept: "Alt+space", toggle: commit_code, when: always}
# 或者
"key_binder/bindings":
- {accept: "Alt+space", switch: commit_code, when: always}
inline_ascii 行为有点难实现,其他的直接用了 ascii_composer 里的逻辑
https://github.com/zhylmzr/librime/commit/da107c46533e612ec97ca07500b40103f94a9b53
錄下 的key 參考 Alt_L Alt+space Alt+Release+space Alt+Release+Alt_L