Skip to content

openfly_hint_filter 过滤掉次选问题 #41

Answered by amorphobia
rysyd asked this question in 问与答/Q&A
Discussion options

You must be logged in to vote

你发现的这个对应的是官方发布的小鹤音形的「二重简码」,官方的直通车是输入 oei 然后选择关闭或开启

当前版本的二重简码一共有90个,filter 的这一行就是控制这个词库显示的开关

不推荐直接修改 lua 脚本,因为以后的更新会覆盖。如果想要默认显示二重简码,建议在 openfly.custom.yaml 里加上

patch:
  switches/+:
    - name: openfly_enable_2nd_short
      states: [ 二重简码关闭, 开启 ]
      reset: 1

这段代码是在 Rime 的开关里面加上二重简码的开关,并且 reset: 1 会默认打开二重简码,正如 Rime 里的简繁、中英的开关。

另外,需要在 default.custom.yaml 里面加上

__patch:
  - patch/+:
      "switcher/save_options/+":
        - "openfly_enable_2nd_short"

如果你是通过东风破安装的,那么这段应该已经有了,这个代码是将二重简码的开关设置为自动保存,这样即使重新加载 Rime 算法服务后,也会读取之前的设置。

另外,当前版本的 librime 算法服务,没有包含 hchunhui/librime-lua#92 这个改动,所以暂时无法像官方版小鹤音形那样通过直通车切换开关,但是可以使用 Rime 自己的方式,绑定快捷键来切换。

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@selong1234
Comment options

@amorphobia
Comment options

@selong1234
Comment options

Answer selected by amorphobia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #40 on April 01, 2021 13:52.