librime icon indicating copy to clipboard operation
librime copied to clipboard

key_binder 能否支持 `ascii_composer/switch_key` 的行为

Open zhylmzr opened this issue 2 years ago • 2 comments

key_binder 的 toggle 支持 ascii_mode 选项,但是它是直接清空当前输入的内容切换到英文模式。而 ascii_composer/switch_keycommit_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}

zhylmzr avatar Mar 28 '23 06:03 zhylmzr

inline_ascii 行为有点难实现,其他的直接用了 ascii_composer 里的逻辑 https://github.com/zhylmzr/librime/commit/da107c46533e612ec97ca07500b40103f94a9b53

zhylmzr avatar Mar 28 '23 08:03 zhylmzr

錄下 的key 參考 Alt_L Alt+space Alt+Release+space Alt+Release+Alt_L

shewer avatar Mar 28 '23 15:03 shewer