-
Notifications
You must be signed in to change notification settings - Fork 41
/
moqi_single_xh.schema.yaml
executable file
·249 lines (226 loc) · 9.13 KB
/
moqi_single_xh.schema.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# Rime schema
# encoding: utf-8
# https://github.com/gaboolic/rime-shuangpin-fuzhuma
schema:
schema_id: moqi_single_xh
name: 墨奇音形·顶屏版·鹤拼
version: "2024-05-11"
author:
- gaboolic
description: |
墨奇辅助码·顶屏版·小鹤双拼,为了4码自动上屏 只收录了8000字 https://github.com/gaboolic/rime-shuangpin-fuzhuma/wiki/%E5%A2%A8%E5%A5%87%E7%A0%81%E6%8B%86%E5%88%86%E8%A7%84%E5%88%99
dependencies:
- reverse_moqima
- radical_flypy
- stroke
- zrlf
- emoji
- easy_en
- jp_sela
__include: moqi.yaml:/switches_engine
engine:
processors:
- ascii_composer
- recognizer
- lua_processor@*sbxlm.popping
- lua_processor@*sbxlm.key_binder # 绑定按键
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- affix_segmentor@emojis
- affix_segmentor@verbatim ## not as the last of this list
- affix_segmentor@easy_en_simp
- affix_segmentor@jp_sela
- fallback_segmentor
translators:
- punct_translator
- table_translator@custom_phrase
- table_translator@custom_phrase_3_code
- table_translator@custom_phrase_kf
- table_translator@custom_phrase_mqzg
- table_translator@custom_phrase_super_1jian
- table_translator@custom_phrase_super_2jian
- table_translator@custom_phrase_super_3jian
- table_translator@custom_phrase_super_3jian_no_conflict
- table_translator@big_char
- reverse_lookup_translator
- reverse_lookup_translator@reverse_moqima
- reverse_lookup_translator@radical_flypy
- reverse_lookup_translator@reverse_stroke
- reverse_lookup_translator@reverse_zrlf
- reverse_lookup_translator@reverse_cj
- table_translator
- lua_translator@*date_translator # 时间、日期、星期
- lua_translator@*lunar # 农历
- table_translator@emojis ## 添加注释后:停用ae模式emoji输入
- table_translator@easy_en_simp ## 添加注释后:停用单词输入
- table_translator@jp_sela ## 添加注释后:停用日语输入
- lua_translator@*unicode # Unicode
- lua_translator@*number_translator # 数字、金额大写
- lua_translator@*calculator # 计算器
filters:
# tab置顶词回显在第一个comment中
- lua_filter@*stick
- lua_filter@*long_word_filter # 长词优先(顺序要求:长词优先 > Emoji)
- simplifier@emoji # Emoji
# - lua_filter@*reduce_emoji_filter # 按需启用,作用是降低Emoji在候选项中的位置排序(顺序要求:Emoji > 降低排序)
- simplifier@chaifen
- simplifier@chaifen_all
- simplifier@chinese_english
- simplifier@traditionalize # 简繁切换
- simplifier@mars #火星文
- uniquifier
__include: moqi.yaml:/phrase # 置顶
__include: moqi.yaml:/reverse #反查配置
__include: moqi.yaml:/opencc_config # 拆分 英汉互译 火星文
__include: moqi.yaml:/punctuator # 标点
__include: moqi.yaml:/guide # 引导前缀配置
speller:
popping:
- {accept: "[a-z]", match: "[a-df-zA-DF-Z]\\w{3}"}
# 如果不想让什么标点直接上屏,可以加在 alphabet,或者编辑标点符号为两个及以上的映射
alphabet: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA[/|
# initials 定义仅作为始码的按键,排除 ` 让单个的 ` 可以直接上屏
initials: zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA
# 第一位<空格>是拼音之间的分隔符;第二位<'>表示可以手动输入单引号来分割拼音。
delimiter: " '"
max_code_length: 5
auto_select: true #顶字上屏
auto_select_pattern: ^;.$|^[a-df-zA-DF-Z]\w{3}|^e\w{4}
auto_select_unique_candidate: true
auto_clear: max_length #manual|auto|max_length 空码按下一键确认清屏|空码自动清|达到最长码时后码顶上清屏
## speller 未允许 aj 表示 an
algebra:
# - xform/^([aoe])$/$1$1/
# - xform/^(ang)$/ah/
# - xform/^([^\[]*)iu$/$1Q/
# - xform/^([^\[]*)ei$/$1W/
# - xform/uan$/R/
# - xform/^([^\[]*)[uv]e$/$1T/
# - xform/^([^\[]*)un$/$1Y/
# - xform/^sh([^\[]+)/U$1/
# - xform/^ch([^\[]+)/I$1/
# - xform/^zh([^\[]+)/V$1/
# - xform/^([^\[]*)uo$/$1O/
# - xform/^([^\[]*)ie$/$1P/
# - xform/i?ong$/S/
# - xform/ing$|uai$/K/
# - xform/^([^\[]+)ai$/$1D/
# - xform/^([^\[]+)en$/$1F/
# - xform/^([^\[]+)eng$/$1G/
# - xform/[iu]ang$/L/
# - xform/(.)ang$/$1H/
# - xform/^([^\[]*)ian$/$1M/
# - xform/^([^\[]+)an$/$1J/
# - xform/^([^\[]+)ou$/$1Z/
# - xform/^([^\[]*)[iu]a$/$1X/
# - xform/^([^\[]*)iao$/$1N/
# - xform/^([^\[]+)ao$/$1C/
# - xform/^([^\[]*)ui$/$1V/
# - xform/^([^\[]*)in$/$1B/
# - xlit/QWRTYUIOPSDFGHJKLZXCVBNM/qwrtyuiopsdfghjklzxcvbnm/
# 模糊音 可选择性开启
# - derive/^z([a-z])/v$1/
# - derive/^c([a-z])/i$1/
# - derive/^s([a-z])/u$1/
# - derive/^v([a-z])/z$1/
# - derive/^i([a-z])/c$1/
# - derive/^u([a-z])/s$1/
# - derive/^([jqxy])u/$1v/
## 飞键 可选择性开启
- derive/^([y])j/$1f/
- derive/^qx/qw/
- derive/^qq/qo/
- derive/^ww/wi/
# - derive/^jn/jv/
# - derive/^mn/mv/
# - derive/^jm/jz/
- derive/^([y])h/$1g/
# - derive/^([rgv])f/$1m/
- derive/^([rgv])c/$1n/
translator:
dictionary: moqi_single
enable_completion: false
db_class: tabledb
enable_charset_filter: false
enable_sentence: false
## 默认为不超过 2 个字的候选项显示输入码;将 2 改为 0 可关闭编码提示,
## 改为 1 则是只显示单字的输入码,依此类推。
spelling_hints: 1
comment_format:
- "xform/[a-z]{2}([a-z]{2})/$1/" ## 编码提示只显示辅助码部分
enable_user_dict: false # 是否开启自动调频
preedit_format:
# 复制用户输入, 一份转大写保持原样, 一份由正则转为全拼显示
# - xform/(^.*$)/\U$1\E\t => $1 <=/
# # 小鹤双拼转全拼, 忽略辅码
# - xform/([ '][aoe])(\w)\w{0,2}/$1$2/
# - xform/([ ']\w)([aeiou])\w{0,2}/$1$2/
# - xform/([ '][bpmfdtnljqx])n\w{0,2}/$1iao/
# - xform/([ ']\w)g\w{0,2}/$1eng/
# - xform/([ ']\w)q\w{0,2}/$1iu/
# - xform/([ ']\w)w\w{0,2}/$1ei/
# - xform/([ '][dtnlgkhjqxyvuirzcs])r\w{0,2}/$1uan/
# - xform/([ ']\w)t\w{0,2}/$1ve/
# - xform/([ ']\w)y\w{0,2}/$1un/
# - xform/([ '][dtnlgkhvuirzcs])o\w{0,2}/$1uo/
# - xform/([ ']\w)p\w{0,2}/$1ie/
# - xform/([ '][jqx])s\w{0,2}/$1iong/
# - xform/([ ']\w)s\w{0,2}/$1ong/
# - xform/([ ']\w)d\w{0,2}/$1ai/
# - xform/([ ']\w)f\w{0,2}/$1en/
# - xform/([ ']\w)h\w{0,2}/$1ang/
# - xform/([ ']\w)j\w{0,2}/$1an/
# - xform/([ '][gkhvuirzcs])k\w{0,2}/$1uai/
# - xform/([ ']\w)k\w{0,2}/$1ing/
# - xform/([ '][jqxnl])l\w{0,2}/$1iang/
# - xform/([ ']\w)l\w{0,2}/$1uang/
# - xform/([ ']\w)z\w{0,2}/$1ou/
# - xform/([ '][gkhvuirzcs])x\w{0,2}/$1ua/
# - xform/([ ']\w)x\w{0,2}/$1ia/
# - xform/([ ']\w)c\w{0,2}/$1ao/
# - xform/([ '][dtgkhvuirzcs])v\w{0,2}/$1ui/
# - xform/([ ']\w)b\w{0,2}/$1in/
# - xform/([ ']\w)m\w{0,2}/$1ian/
# - "xform/(^|[ '])v/$1zh/"
# - "xform/(^|[ '])i/$1ch/"
# - "xform/(^|[ '])u/$1sh/"
# - xform/([ '][jqxy])v\w{0,2}/$1u/
# - xform/([ '][nl])v\w{0,2}/$1ü/
# # 双拼编码大写转回小写
# - xform/(^[^a-z=<>]*)/\L$1\E/
# - xform/=> */[/
# - xform/ *<=/]/
key_binder:
import_preset: default
bindings:
#- { when: composing, accept: Tab, send: '[' } ## 取消注释后:tab引导辅助码
- { when: composing, accept: Control+m, send: Return }
- { when: composing, accept: Control+w, send: Control+BackSpace }
- { when: has_menu, accept: semicolon, send: 2 }
# - { when: has_menu, accept: slash, send: 3 } # 用/进行选3
- { when: composing, accept: Control+i, send: Shift+Right }
- { when: composing, accept: Control+o, send: Shift+Left }
# 显示墨奇码拆分的快速开关
- { when: has_menu, accept: "Control+p", toggle: chaifen }
- { when: has_menu, accept: "Control+l", toggle: chaifen_all }
- { when: has_menu, accept: "Control+e", toggle: chinese_english }
- { match: "[a-z]{1,3}", accept: Tab, send_sequence: "/1" }
- { match: "[a-z]{1,3}", accept: slash, send_sequence: "/1" }
- { match: "[a-z]{1,3}", accept: ".", send_sequence: "/1" }
# - { when: composing, match: "[a-z]{2}", accept: Tab, send: '|' }
## 对以下4行取消注释后:启用光标回退至特定音节后、补充辅助码的功能
#- { when: composing, accept: Control+1, send_sequence: '{Home}{Shift+Right}[' }
#- { when: composing, accept: Control+2, send_sequence: '{Home}{Shift+Right}{Shift+Right}[' }
#- { when: composing, accept: Control+3, send_sequence: '{Home}{Shift+Right}{Shift+Right}{Shift+Right}[' }
#- { when: composing, accept: Control+4, send_sequence: '{Home}{Shift+Right}{Shift+Right}{Shift+Right}{Shift+Right}[' }
menu:
page_size: 3