wongdean / rime-settings

接近原生的鼠须管 Rime 配置
1.5k stars 156 forks source link

非常好用,不过 Mac 端方括号翻页无效 Orz #47

Closed krimeshu closed 3 years ago

krimeshu commented 3 years ago

在配置文件里看到有相关配置,但是不知道为什么没有生效,有哪位遇到过这个情况吗?

  key_binder/bindings: # 设置哪些键可以翻页,需要哪个取消注释即可
    # - { when: composing, accept: Tab, send: Page_Up } # Tab 翻页
    - { when: composing, accept: Tab, send: Right } # Tab 移动光标向右
    - { when: composing, accept: Shift+Tab, send: Page_Up }
    - { when: paging, accept: minus, send: Page_Up }
    - { when: has_menu, accept: equal, send: Page_Down }
    - { when: paging, accept: bracketleft, send: Page_Up }
    - { when: has_menu, accept: bracketright, send: Page_Down }
krimeshu commented 3 years ago

搜索项目代码,发现 lua/select_character.lua 里面有 bracketright 相关的代码,修改后居然生效了:

local function select_character(key, env)
   local engine = env.engine
   local context = engine.context
   local commit_text = context:get_commit_text()
   local config = engine.schema.config
-  local first_key = config:get_string('key_binder/select_first_character') or 'bracketleft'
-  local last_key = config:get_string('key_binder/select_last_character') or 'bracketright'
+  local first_key = config:get_string('key_binder/select_first_character')
+  local last_key = config:get_string('key_binder/select_last_character')
wtaochina commented 3 years ago

用楼上的方法解决

wongdean commented 3 years ago

是的,这个是我疏忽了,我引入了[、]选词的插件,原本的翻页功能就不能用了,我应该在说明里写一下的,抱歉

risingfred commented 3 years ago

完美的解决 层主很细心 感谢

wongdean commented 3 years ago

已经修复,你提的pr把插件改掉了,这样想用这个方案的人是找不到的。我已经把分支中默认的“以词定字”关掉了,现在默认就是翻页了,请知晓~

xeno993 commented 2 months ago

困扰好久的问题,感谢