-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path092wubi.schema.yaml
407 lines (358 loc) · 11.1 KB
/
092wubi.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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
schema:
dependencies:
- 092chaifen
- 092wubi_U
- 092wubi_ext
- emoji
- html_chars
- latin_international
- ipa_yunlong
- short_punct
- named_ipa_diacritics
- pinyin_simp
- stroke_full
- gojuuon
- combining_diacritics
- enclosed_alphanumerics
- greek
- superscript
- subscript
name: "五笔"
schema_id: 092wubi
version: 1
switches: # 0 默认关,1 默认开
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ] #中英文状态
- name: extended_char #自定义字集
reset: 0
states: [ 常用字, 全字集 ]
- name: pinyin #拼音滤镜
reset: 0
states: [ 拼, pīn ]
- name: emoji_cn #emoji滤镜
reset: 0
states: [ 😔, 😀 ]
- name: chaifen
reset: 0
states: [ 拆隐, 拆显 ]
- name: simplification #简转繁滤镜
reset: 0
states: [ 简中, 繁中 ]
- name: charset_comment_filter #字符集提示
reset: 0
states: [ U区关, U区开 ]
- name: udpf_switch
reset: 0
states: [ U编关, U编开 ]
- name: ascii_punct
reset: 0
states: [ 。,, ., ]
- name: dz_ci #过滤词组
reset: 0
states: [ 词组, 单字 ]
- name: full_shape
reset: 0
states: [ 半角, 全角 ]
- name: preedit_is_candidate
reset: 0
states: [ "预览为候选", "预览为编码" ]
engine:
processors:
- lua_processor@log_processor
- lua_processor@key_rejector
- ascii_composer
- lua_processor@alphabet_mode_processor
- lua_processor@short_punct_pre_recognizer_processor
- recognizer
- lua_processor@enter_clear_input_processor
- lua_processor@short_punct_pre_speller_processor
- speller
- lua_processor@alphabet_mode_post_speller_processor
- key_binder
- lua_processor@cancel_input_processor
- punctuator
- selector
- navigator
- express_editor #计算
segmentors: # 分段
- ascii_segmentor
- matcher
- affix_segmentor@emoji
- affix_segmentor@html_chars
- affix_segmentor@latin_input
- affix_segmentor@ipa_input
- affix_segmentor@sys_env
- affix_segmentor@help_translator
- affix_segmentor@named_ipa_diacritics
- affix_segmentor@stroke_full
- affix_segmentor@gojuuon
- affix_segmentor@combining_diacritics
- affix_segmentor@enclosed_alphanumerics
- affix_segmentor@greek
- affix_segmentor@superscript
- affix_segmentor@subscript
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- reverse_lookup_translator #拼音反查
- table_translator
- table_translator@translator_extend
- table_translator@emoji
- table_translator@html_chars
- table_translator@latin_input
- table_translator@ipa_input
- table_translator@named_ipa_diacritics
- table_translator@stroke_full
- table_translator@gojuuon
- table_translator@combining_diacritics
- table_translator@enclosed_alphanumerics
- table_translator@greek
- table_translator@superscript
- table_translator@subscript
- lua_translator@full_chars_translator
- lua_translator@number_translator # 数字转大写
- lua_translator@shijian2_translator # 高级时间
- lua_translator@alphabet_mode_translator
- lua_translator@unicode_input_translator
- lua_translator@info_translator
- lua_translator@sys_env_translator
- lua_translator@help_translator
filters:
- simplifier@simplification #简繁滤镜
- simplifier@pinyin #拼音滤镜
- lua_filter@filter_092chaifen
- simplifier@emoji_cn #表情滤镜
- lua_filter@charset_comment_filter #Unicode分区提示滤镜
- lua_filter@lua_unicode_display_filter #Unicode编码显示
- lua_filter@preedit_candidate_filter
#- uniquifier #过滤重复
- lua_filter@uniquifier_filter
- lua_filter@dz_ci
speller:
auto_clear: max_length # 3种选择, manual|auto|max_length 空码按下一键确认清屏|空码自动清|达到最长码时后码顶上清屏
auto_select: true
max_code_length: 4
alphabet: "zyxwvutsrqponmlkjihgfedcba"
translator:
dictionary: 092wubi
enable_charset_filter: false
enable_encoder: false
enable_sentence: false
encode_commit_history: false
# max_phrase_length: 4
enable_user_dict: false
enable_completion: false # 编码提示 true 开启 false 关闭
comment_format: #提示码自定义
- "xform/~/ /" #去掉编码提示前的~号
# - "xform/^/ /" #提示前面 +间距
translator_extend:
dictionary: 092wubi.extend
enable_charset_filter: false
enable_encoder: false
enable_sentence: false
encode_commit_history: false
# max_phrase_length: 4
enable_user_dict: false
enable_completion: false # 编码提示 true 开启 false 关闭
comment_format: #提示码自定义
- "xform/~/ /" #去掉编码提示前的~号
# - "xform/^/ /" #提示前面 +间距
reverse_lookup:
dictionary: pinyin_simp
prefix: "|"
tips: "〔拼音〕"
preedit_format:
- "xform/([nl])v/$1ü/"
- "xform/([nl])ue/$1üe/"
- "xform/([jqxy])v/$1u/"
comment_format:
- "xform/^/ /"
# suffix: "'"
key_binder:
# import_preset: default
bindings:
- { accept: space, send: space, when: has_menu } # 有候选时空格上屏首选
- { accept: Shift+space, toggle: ascii_mode, when: always }
- { accept: semicolon, send: '2', when: has_menu } # 次选
- { accept: apostrophe, send: '3', when: has_menu }
- { accept: grave, send: '4', when: has_menu } # CapsLock
- { accept: Caps_Lock, send: '4', when: has_menu } # CapsLock config on Android
- { accept: Arabic_switch, send: '4', when: has_menu }
- { accept: bracketleft, send: '5', when: has_menu }
- { accept: Tab, send: '6', when: has_menu }
- { accept: slash, send: '0', when: has_menu }
- { accept: '3', send: '0', when: has_menu }
- { accept: '2', send: '3', when: has_menu }
- { when: has_menu, accept: minus, send: Page_Up } # 向后翻页
- { when: has_menu, accept: equal, send: Page_Down } # 向前翻页
- { accept: "Control+o", toggle: simplification, when: composing } # 简繁开关
- { accept: "Control+p", toggle: pinyin, when: composing } # 拼音开关
- { accept: "Control+e", toggle: emoji_cn, when: composing } # emoji开关
- { accept: "Control+u", toggle: charset_comment_filter, when: composing } # Unicode分区开关
- { accept: "Control+y", toggle: udpf_switch, when: composing } # Unicode编码开关
- { accept: "Control+h", toggle: extended_char, when: composing } # 自定字集开关
- { accept: "Control+b", toggle: chaifen, when: composing } # 拆分滤镜开关
- { accept: 'Control+k', send: Up, when: composing } # Vim-style up key bind
- { accept: 'Control+j', send: Down, when: composing } # Vim-style down key bind
- { accept: "Control+d", toggle: dz_ci, when: composing } # 单字与词组切换
- { accept: "Control+i", toggle: preedit_is_candidate, when: composing } # preedit为候选 开关
- { when: always, accept: "Control+period" , toggle: ascii_punct } # 中英标点切换
- { accept: space, send: Escape, when: composing } # 无候选时(空码)空格清屏
recognizer:
import_preset: default
patterns:
punct: "^/(?!uni)(?!cal)(?!num)(?!info)(?!hc)(?!em)(?!lt)(?!ipa)(?!env/)(?!help)(?!nipa)(?!sk)(?!jp)(?!cb)(?!ec)(?!gk)(?!sup)(?!sub)([0-9]0?|[A-Za-z]+)$"
# uppercase: "" #中文状态大写锁定直接上屏
reverse_lookup: '^\|[a-z]*''?$'
alphabet_mode: '^[;A-Z].*$'
unicode: "^/uni[a-zA-Z0-9]*$"
number_chinese: '^/num([0-9]+\.?[0-9]*)?$'
calendar: '^/cal[0-9]*$'
emoji: '^/em[a-zA-Z0-9\-\+]*$'
info: '^/info$'
html_chars: '^/hc[a-zA-Z0-9]*$'
latin_input: '^/lt[A-Za-z0-9`\-=\[\];'',\.\/~!\^\*\(\)\+:\"<>\?]*$'
ipa_input: '^/ipa.*$'
sys_env: '^/env/.*$'
help: '^/help$'
named_ipa_diacritics: '^/nipa[a-zA-Z0-9\-]*$'
stroke_full: '^/sk[tyghn]*$'
gojuuon: '^/jp[a-z]{0,3}$'
combining_diacritics: '^/cb[a-z\-]*$'
enclosed_alphanumerics: '^/ec[a-z0-9]*$'
greek: '^/gk[a-z]*$'
superscript: '^/sup[a-z]$'
subscript: '^/sub[a-z]$'
# ↓简繁(+部分异体)滤镜
simplification: #⇩四选一
opencc_config: st_tu.json # 简 ➡ 繁·异(秃版标准)
# opencc_config: s2tw.json # 简 ➡ 台湾正体
# opencc_config: s2hk.json # 简 ➡ 香港繁体
# opencc_config: s2twp.json # 简 ➡ 台湾正体(含常用词汇如:软体→軟體、鼠标→滑鼠)
option_name: simplification
tips: all #all字词|char字
# ↓拼音滤镜
pinyin:
opencc_config: pinyin.json
option_name: pinyin
show_in_comment: true #作为注解在后面显示
comment_format:
- 'xform/ / /'
# - "xform/^/ /"
tips: all
tags:
- abc
- tiger
# - reverse_lookup
# ↓emoji表情滤镜
emoji_cn:
opencc_config: emoji.json
option_name: emoji_cn
tips: all
emoji:
dictionary: emoji
tag: emoji
tips: 〔Emoji〕
prefix: '/em'
enable_completion: true
enable_sentence: false
enable_user_dict: false
html_chars:
dictionary: html_chars
tag: html_chars
tips: 〔字符代码〕
prefix: '/hc'
enable_completion: true
enable_sentence: false
enable_user_dict: false
latin_input:
dictionary: latin_international
tag: latin_input
tips: 〔Latin〕
prefix: '/lt'
enable_completion: true
enable_sentence: false
enable_user_dict: false
comment_format:
- xform/^~(.*)$/$1/
ipa_input:
dictionary: ipa_yunlong
tag: ipa_input
tips: 〔IPA〕
prefix: '/ipa'
enable_completion: true
enable_sentence: false
enable_user_dict: false
named_ipa_diacritics:
dictionary: named_ipa_diacritics
tag: named_ipa_diacritics
tips: 〔IPA〕
prefix: '/nipa'
enable_completion: true
enable_sentence: false
enable_user_dict: false
stroke_full:
dictionary: stroke_full
tag: stroke_full
tips: 〔笔划〕
prefix: '/sk'
enable_completion: true
enable_sentence: false
enable_user_dict: false
gojuuon:
dictionary: gojuuon
tag: gojuuon
tips: 〔假名〕
prefix: '/jp'
enable_completion: true
enable_sentence: false
enable_user_dict: false
combining_diacritics:
dictionary: combining_diacritics
tag: combining_diacritics
tips: 〔组合附加符号〕
prefix: '/cb'
enable_completion: true
enable_sentence: false
enable_user_dict: false
enclosed_alphanumerics:
dictionary: enclosed_alphanumerics
tag: enclosed_alphanumerics
tips: 〔闭合字母与数字〕
prefix: '/ec'
enable_completion: true
enable_sentence: false
enable_user_dict: false
greek:
dictionary: greek
tag: greek
tips: 〔希腊字母〕
prefix: '/gk'
enable_completion: true
enable_sentence: false
enable_user_dict: false
superscript:
dictionary: superscript
tag: superscript
tips: 〔上标〕
prefix: '/sup'
enable_completion: true
enable_sentence: false
enable_user_dict: false
subscript:
dictionary: subscript
tag: subscript
tips: 〔下标〕
prefix: '/sub'
enable_completion: true
enable_sentence: false
enable_user_dict: false
punctuator:
import_preset: symbols
ascii_composer:
switch_key:
Shift_L: noop
Shift_R: noop