Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: 定制组合键 #1131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

luminosara
Copy link

支持组合键行为自定义,包括覆盖默认行为与增加新行为

librime 1.12.0 中更改了 commit_script_text 的默认行为(924),这将导致采用 commit_script_text 的组合键 Control+回车 输出行为可能与预期不一致,通过这个 pr 来定制组合键行为

ExpressEditor 定义的默认行为可见 editor.cc,还可参考说明

备注:为了测试,没有修改所有涉及的 schema.yaml;是称为组合键/操作键/快捷键等细节与注释还可以修改

支持组合键行为自定义,包括覆盖默认行为与增加新行为
@iDvel
Copy link
Owner

iDvel commented Jan 8, 2025

感谢。
这个好像不能像 punctuatorkey_binder 那样在 default.yaml 里定义,再在多个方案里引用。
试了一下似乎只能是写在方案里,有空试试各种效果,我把默认的写在全拼方案里作为修改参考吧。

@mirtlebot
Copy link

mirtlebot commented Jan 12, 2025

我其实没明白,特地新增此声明的理由是什么?这么设置后,会影响旧版本的 librime 吗?

如果不声明,会怎么样呢?

这个好像不能像 punctuator 或 key_binder 那样在 default.yaml 里定义,再在多个方案里引用。

因为 librime 有两种 editor engine,根据方案里面配置的不同,有两套不同的默认按键。

@luminosara
Copy link
Author

感谢。 这个好像不能像 punctuatorkey_binder 那样在 default.yaml 里定义,再在多个方案里引用。 试了一下似乎只能是写在方案里,有空试试各种效果,我把默认的写在全拼方案里作为修改参考吧。

确实,我试了下也不行,可能只能先这样修改参考了

@luminosara
Copy link
Author

我其实没明白,特地新增此声明的理由是什么?这么设置后,会影响旧版本的 librime 吗?

如果不声明,会怎么样呢?

这个好像不能像 punctuator 或 key_binder 那样在 default.yaml 里定义,再在多个方案里引用。

因为 librime 有两种 editor engine,根据方案里面配置的不同,有两套不同的默认按键。

是有两种,但修改的应当都是方案中选择的那一种

不声明,按照定义的默认行为来,但比如小键盘的回车就不能像回车一样起作用,需要再自行声明下

不影响旧版本的librime

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants