/
bopomo_onion_double.schema.yaml
499 lines (485 loc) · 20.8 KB
/
bopomo_onion_double.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
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
# Rime schema settings
# encoding: utf-8
# 《洋蔥 雙拼注音 設定頁》
schema:
schema_id: bopomo_onion_double
name: "☆注音(洋蔥雙拼版)☆"
version: "202405"
author:
- 『洋蔥』
description: |
使用洋蔥雙拼注音鍵位
dependencies:
- cangjie5
- symbols_bpmf_double
switches:
- name: ascii_mode
reset: 0
states: ["中文", "英文"]
- name: full_shape
reset: 0
states: ["半形", "全形"]
- name: ascii_punct
reset: 0
states: ["。,", ".,"]
- name: simplification
reset: 0
states: ["原體", "简体"]
- name: only_cjk_filter
reset: 1
states: ["完全", "CJK"]
# - options: [ utf8, big5, gbk]
# # reset: 0
# states:
# - UTF-8
# - BIG5
# - GBK
- name: emoji_segestion
reset: 1
states: [ 🈚️, 🈶️ ]
- name: back_mark
reset: 1
# states: [ 無註, 註釋 ]
- name: punct_mark
reset: 1
# states: [ 無, 註 ]
- name: unicode_comment
reset: 0
states: [ '🄽', '🅄' ]
# states: [ 'nil', 'Unicode(URL)' ]
# - name: debug_comment
# reset: 0
# states: [ 'Ⓝ', 'Ⓓ' ]
# states: [ 'normal', 'Debug' ]
- name: return_mode
reset: 0
states: [ "Return & Space", "Space" ]
engine:
filters:
- lua_filter@punct_preedit_revise_filter
# - charset_filter@big5
# - charset_filter@gbk
- lua_filter@charset_cjk_filter_plus
- simplifier@emoji_switch
- simplifier@zh_cn
- simplifier@back_mark
- simplifier@punct_mark
- reverse_lookup_filter@bpm_reverse_lookup
- uniquifier
- lua_filter@comment_filter_unicode # unicode 和 debug 分開,同時開啟無法記憶
# - lua_filter@comment_filter_debug # unicode 和 debug 分開,同時開啟無法記憶
# - lua_filter@comment_filter_unicode_debug
processors:
# - lua_processor@lua_tran_kp #使 lua 之 mf_translator 數字和計算機功能可用小鍵盤輸入。
- lua_processor@mix_kp_return #合併 lua_tran_kp 和 return 上屏模式切換。
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
# - fluency_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- affix_segmentor@emoji_series
- affix_segmentor@reverse2_lookup
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- lua_translator@lua_custom_phrase
- table_translator@emoji_series
- script_translator@reverse2_lookup
- script_translator
- lua_translator@mf_translator
# - lua_translator@t_translator
- lua_translator@email_url_translator
- lua_translator@instruction_dbpmf
################################# lua 引用 ####################################
mf_translator:
prefix: "`"
lua_custom_phrase:
user_dict: "bopomo_onion_double_phrase"
# user_dict: "lua_custom_phrase"
################################### 濾鏡 ######################################
zh_cn:
opencc_config: tw2s.json
tips: all
tags: [ abc ]
charset_cjk_filter_plus:
tags: [ abc, reverse2_lookup ]
emoji_switch:
opencc_config: emoji_t.json
option_name: emoji_segestion
tags: [ abc ]
# tips: all #在emoji後面加註文字
back_mark:
opencc_config: back_mark.json
option_name: back_mark
# allow_erase_comment: true
show_in_comment: true
# excluded_types: [ reverse_lookup ]
tags: [ abc, emoji_series ]
tips: char #all #none
comment_format:
- xform/^/ /
- xform/@/ /
punct_mark:
opencc_config: punct_mark.json
option_name: punct_mark
show_in_comment: true
tags: [ punct ]
tips: all
comment_format:
- erase/^.*〔.*〕.+$/
- erase/^.+〔.*〕$/
punct_preedit_revise_filter:
tags: [ punct ]
# only_cjk_filter:
# tags: [ abc ]
# big5:
# tags: [ abc ]
# gbk:
# tags: [ abc ]
################################### 選單 ######################################
menu:
alternative_select_keys: "1234567890"
page_size: 6
################################### 拼寫 ######################################
speller:
alphabet: "abcdefghijklmnopqrstuvwxyz;',./"
initials: "abcdefghijklmnopqrstuvwxyz"
finals: ";',./"
delimiter: " \\" #" `"
algebra:
##### 非正確注音(補空碼或慣用發音)轉寫 #####
- xform/[)(]//
########################################
- xform/iu/iU/ #iou
- xform/ui/uI/ #uei
- xform/ong/ung/
- xform/yi?/i/
- xform/wu?/u/
- xform/iu/v/
- xform/([jqx])u/$1v/
- xform/([iuv])n/$1en/
- xform/zhi?/Z/
- xform/chi?/C/
- xform/shi?/S/
- xform/([zcsr])i/$1/
- xform/ai/A/
- xform/ei/I/
- xform/ao/O/
- xform/ou/U/
- xform/ang/K/
- xform/eng/G/
- xform/an/M/
- xform/en/N/
- xform/er/R/
- xform/eh/E/
- xform/([iv])e/$1E/
##### 內嵌注音文 #####(注音雙拼單已有調出單注音方式,故這裡不再輸出單注音)
- erase|^*([bpmfdtnlgkhjqxZCSrzcsiuvaoeEAIOUMNKGR12345])$|| #消除單個注音
# - xform|^**|| #開頭「**」使注音文不被前面縮略,該正則回復。
- xform|^**(.+)$|$1~| #開頭「**」轉成末尾「~」,使注音文不被後面簡化給縮略。
###########################
- xform/^([bpmfdtnlgkhjqxZCSrzcs])v(\d~?)$/$1y$2/
- xform/^v/y/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])iO/$1q/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])iU/$1c/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])(uA|iM)/$1m/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])uo/$1o/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])iE/$1p/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])[vu]N/$1v/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])[vu]G/$1b/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])(vE|uI)/$1l/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])[ui]a/$1z/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])[ui]K/$1x/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])[vu]M/$1n/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])iN/$1r/
- xform/^([bpmfdtnlgkhjqxZCSrzcs])iG/$1t/
- xform/^([aoeEAIOUMNKGR]\d~?)$/o$1/
- xform/^([rZSCzsc])(\d~?)$/$1i$2/
- xform/^([yui])(\d~?)$/$1e$2/
- 'xlit|ORUAKMNGEIZSC|wrdjshfgkkwav|'
###########################
- abbrev/^([a-z][a-z])\d$/$1/
- abbrev/^([abcdfghijklmnopqrstuvwxyz])[a-z]\d$/$1/ #
# - abbrev/^([yui])e\d$/$1/ #
- abbrev/^([yui])e(\d)$/$1$2/
- abbrev/^([abcdfghjklmnopqrstvwxz])[a-z](\d)$/$1$2/
###########################
- xform|~|| #開頭「**」轉成末尾「~」,使注音文不被前面簡化給縮略。此條回復。
#之前聲調# - "xlit|12345|;/.,'|"
- "xlit|12345|;/,'.|"
##### 內嵌單注音 #####
- "xlit|12345abcdefghijklmnopqrstuvwxyz|;/,'.abcdefghijklmnopqrstuvwxyz|"
################################### 主翻譯器 ###################################
translator:
dictionary: bopomo_onion_double.extended
prism: bopomo_onion_double
# enable_charset_filter: false
enable_completion: false #新版有長詞補全,用此關閉
enable_user_dict: true
# initial_quality: 0
preedit_format:
###############
- xform/\\/ /
- xform|^([a-z ,./';]+)$|\U$1\E\t($1)|
- xform|([A-Z]),|$1,|
- xform|([A-Z])[.]|$1.|
- xform|([A-Z])[/]|$1/|
- xform|([A-Z]);|$1;|
- xform|([A-Z])'|$1'|
- "xlit|ABCDEFGHIJKLMNOPQRSTUVWXYZ|ABCDEFGHIJKLMNOPQRSTUVWXYZ|"
###############
- 'xform/([a-z])([a-z])/$1\U$2\E/'
- "xlit|ASDFGHJYUIEW|ㄚㄤㄡㄣㄥㄢㄞㄩㄨㄧㄜㄠ|"
- 'xform/([wraszcviuy])ㄧ/$1ㄭ/' #iuy
- 'xform/([iuy])ㄜ/$1ㄭ/'
- 'xform/Q/:ㄧㄠ/'
- 'xform/R/:ㄧㄣ\|ㄦ/'
- 'xform/T/:ㄧㄥ/'
- 'xform/O/:ㄛ\|ㄨㄛ/'
- 'xform/P/:ㄧㄝ/'
- 'xform/K/:ㄟ\|ㄝ/'
- 'xform/L/:ㄩㄝ\|ㄨㄟ/'
- 'xform/Z/:ㄧㄚ\|ㄨㄚ/'
- 'xform/X/:ㄧㄤ\|ㄨㄤ/'
- 'xform/C/:ㄧㄡ/'
- 'xform/V/:ㄨㄣ\|ㄩㄣ/'
- 'xform/B/:ㄨㄥ\|ㄩㄥ/'
- 'xform/N/:ㄨㄢ\|ㄩㄢ/'
- 'xform/M/:ㄧㄢ\|ㄨㄞ/'
#######
- 'xform/(o):ㄧㄣ\|ㄦ/$1:ㄦ/'
- 'xform/([bpmdtnljqx]):ㄧㄣ\|ㄦ/$1:ㄧㄣ/'
- 'xform/([bmfiuo]):ㄛ\|ㄨㄛ/$1:ㄛ/'
- 'xform/([dtngkhwvarzcs]):ㄛ\|ㄨㄛ/$1:ㄨㄛ/'
- 'xform/([bpmfdtnlgkhwvarzcsu]):ㄟ\|ㄝ/$1:ㄟ/' #v
- 'xform/([yi]):ㄟ\|ㄝ/$1:ㄝ/'
- 'xform/([dtgkhwvarzcs]):ㄩㄝ\|ㄨㄟ/$1:ㄨㄟ/'
- 'xform/([jqxl]):ㄩㄝ\|ㄨㄟ/$1:ㄩㄝ/'
- 'xform/([pdnljqx]):ㄧㄚ\|ㄨㄚ/$1:ㄧㄚ/'
- 'xform/([gkhavw]):ㄧㄚ\|ㄨㄚ/$1:ㄨㄚ/'
- 'xform/([dnljqx]):ㄧㄤ\|ㄨㄤ/$1:ㄧㄤ/'
- 'xform/([ghavw]):ㄧㄤ\|ㄨㄤ/$1:ㄨㄤ/' #[gkhavw]ㄎㄧㄤ
- 'xform/([k]):ㄧㄤ\|ㄨㄤ/$1:ㄨㄤ\|ㄧㄤ/' #校正:ㄎㄧㄤ少用,ㄎㄨㄤ較常用
- xform ([k]):ㄨㄤ\|ㄧㄤ([',./]) $1:ㄨㄤ$2
- 'xform/([dtnlgkhwvarzcs]):ㄨㄣ\|ㄩㄣ/$1:ㄨㄣ/'
- 'xform/([jqx]):ㄨㄣ\|ㄩㄣ/$1:ㄩㄣ/'
- 'xform/([dtnlgkhwvarzcs]):ㄨㄥ\|ㄩㄥ/$1:ㄨㄥ/'
- 'xform/([jqx]):ㄨㄥ\|ㄩㄥ/$1:ㄩㄥ/'
- 'xform/([dtngkhwvarzcs]):ㄨㄢ\|ㄩㄢ/$1:ㄨㄢ/' #l
- 'xform/([jqx]):ㄨㄢ\|ㄩㄢ/$1:ㄩㄢ/'
- 'xform/([bpmdtnljqx]):ㄧㄢ\|ㄨㄞ/$1:ㄧㄢ/'
- 'xform/([gkhwva]):ㄧㄢ\|ㄨㄞ/$1:ㄨㄞ/'
#######
- "xform|([( ][abcdfghjklmnopqrstvwxz])([;/,'.])|$1⁎$2|" #只有聲母加聲調時,其可能省略韻母之提示。
- "xform|([( ][yui])([;/,'.])|$1₊$2|" #只有ㄧㄨㄩ加聲調時,其可能省略韻母之提示。
#之前聲調# - "xlit|bpmfdtnlgkhjqxrzcsiuywvao;/.,'|ㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄖㄗㄘㄙㄧㄨㄩㄓㄔㄕ◌ˉˊˇˋ˙|"
- "xlit|bpmfdtnlgkhjqxrzcsiuywvao;/,'.|ㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄖㄗㄘㄙㄧㄨㄩㄓㄔㄕ◌ˉˊˇˋ˙|"
##### 內嵌單注音修正 #####
- 'xform|e[^ )]+([ )])|注$1|'
- 'xform|e([ )])|空$1|'
- 'xform|\t(空)$|\t《雙拼注音鍵位說明》|'
#####
# - 'xform|e[^ )]+([ )])|㊟$1|'
# - 'xform|e([ )])|∅$1|'
# - 'xform|\t(∅)$|\t《雙拼注音鍵位說明》|'
############################
# - "xlit|ABCDEFGHIJKLMNOPQRSTUVWXYZ,./;'|abcdefghijklmnopqrstuvwxyz,./;'|"
- "xlit|ABCDEFGHIJKLMNOPQRSTUVWXYZ,./;'|ABCDEFGHIJKLMNOPQRSTUVWXYZ,./;'|"
- 'xform/://'
############################## 以下為系列符號 ##########################################
emoji_series:
tag: emoji_series
dictionary: symbols_bpmf
prism: symbols_bpmf_double
# enable_charset_filter: false
# enable_encoder: false
# encode_commit_history: false
enable_sentence: false
enable_completion: false
# sentence_over_completion: false
enable_user_dict: true
prefix: ";"
# suffix: "'"
tips: "《emoji集》▶"
closing_tips: "◀《emoji集》"
preedit_format:
__include: element_bopomo_double:/preedit_format
################################ 以下為使用ooo反查注音 #############################
reverse2_lookup:
tag: reverse2_lookup
dictionary: cangjie5
# enable_charset_filter: false
enable_completion: false
enable_user_dict: true
prefix: "="
# suffix: "'"
tips: "《反查》▶"
closing_tips: "◀《反查》"
preedit_format:
# - "xlit|abcdefghijklmnopqrstuvwxyz|ABCDEFGHIJKLMNOPQRSTUVWXYZ|"
- "xlit|abcdefghijklmnopqrstuvwxyz|日月金木水火土竹戈十大中一弓人心手口尸廿山女田難卜符|"
- xform/^/《反查》/
# - 'xform/`/ /'
bpm_reverse_lookup:
tags: [ reverse2_lookup ]
overwrite_comment: true
dictionary: bopomo_onion_double.extended
comment_format:
- xform/iu/iU/ #iou
- xform/ui/uI/ #uei
- xform/ong/ung/
- xform/yi?/i/
- xform/wu?/u/
- xform/iu/v/
- xform/([jqx])u/$1v/
- xform/([iuv])n/$1en/
- xform/zhi?/Z/
- xform/chi?/C/
- xform/shi?/S/
- xform/([zcsr])i/$1/
- xform/ai/A/
- xform/ei/I/
- xform/ao/O/
- xform/ou/U/
- xform/ang/K/
- xform/eng/G/
- xform/an/M/
- xform/en/N/
- xform/er/R/
- xform/eh/E/
- xform/([iv])e/$1E/
- xform/1//
- 'xlit|bpmfdtnlgkhjqxZCSrzcsiuvaoeEAIOUMNKGR2345|ㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙㄧㄨㄩㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦˊˇˋ˙|'
################################### 符號處理 ####################################
punctuator:
import_preset: punct_bopomo_double
# import_preset: symbols
################################# 按鍵處理 ######################################
key_binder:
import_preset: default
bindings:
### 避 RIME 原設定鍵位衝突 ###
- {accept: comma, send: comma, when: has_menu}
- {accept: comma, send: comma, when: paging}
- {accept: period, send: period, when: has_menu}
- {accept: period, send: period, when: paging}
- {accept: minus, send: minus, when: has_menu}
- {accept: minus, send: minus, when: paging}
- {accept: equal, send: equal, when: has_menu}
- {accept: equal, send: equal, when: paging}
### 切分移位 ###
# - {accept: Up, send: KP_Left, when: composing} #左移一個注音
- {accept: Up, send: Left, when: composing} #左移一整個字
- {accept: Up, send: Up, when: paging} #修正上條目出現的bug
##
- {accept: Left, send: KP_Left, when: composing} #左移一個注音
# - {accept: Right, send: Shift+Right, when: composing} #右移一整個字
# - {accept: Shift+Right, send: Right, when: composing} #右移一個注音
# - {accept: Shift+Left, send: KP_Left, when: composing} #左移一個注音
#關# - {accept: Shift+space, send: Shift+Right, when: composing} #首節
# - {accept: Shift+space, send: KP_Left, when: composing} #左移一個注音
# - {accept: Left, send: KP_Left, when: composing} #左移一個注音
##
# - {accept: Shift+Tab, send: Right, when: composing} #右移一個注音
# - {accept: Tab, send: KP_Left, when: composing} #左移一個注音
### 選字翻頁 ###
- {accept: Left, send: Page_Up, when: paging} #直式選單用 #has_menu
- {accept: Right, send: Page_Down, when: paging} #直式選單用 #has_menu
# - {accept: Up, send: Page_Up, when: paging} #橫式選單用
# - {accept: Down, send: Page_Down, when: paging} #橫式選單用
# - {accept: Left, send: Left, when: has_menu} #橫式選單用 #send: Shift+Up
# - {accept: Right, send: Right, when: has_menu} #橫式選單用 #send: Shift+Down
- {accept: Shift+Down, send: Page_Down, when: has_menu} #選字時「Shift」+「下」翻頁。
- {accept: Shift+Up, send: Page_Up, when: paging} #選字時「Shift」+「上」翻頁。
#關# - {accept: Tab, send: Page_Down, when: has_menu} #「tab」翻頁。
- {accept: Shift+Tab, send: Page_Up, when: paging} #選字時「Shift」+「tab」翻頁。
- {accept: Shift+space, send: Page_Down, when: has_menu} #選字時「Shift」+「空白鍵」翻頁。 #send: Right #send: Down
##回復到 composing 狀態:
#關# - {accept: Shift+space, send: Shift+Left, when: paging} #於選單列選字時,回復到輸入列(避免有時回復不了,故增加)。
- {accept: Tab, send: Shift+Left, when: paging} #於選單列選字時,回復到輸入列(避免有時回復不了,故增加)。
### 空白鍵 ###
# - {accept: space, send: Return, when: paging} #方向鍵選字時,space直接上屏(避免被一聲空格影響)
# - {accept: space, send: Page_Down, when: paging} #方向鍵選字時,space翻頁(上條遮屏需開啟,否則「=」+「符號」會誤按)
## - {accept: space, send: Down, when: has_menu}
## - {accept: space, send: Down, when: paging}
## - {accept: space, send: space, when: composing}
# - {accept: space, send: Escape, when: composing} #空碼時,按空格清除
- {accept: space, send_sequence: "{Escape}{space}", when: composing} #空碼時,按空格清除(測試,如:輸入heart,前面碼有候選項,後面碼無候選項,還是可上屏前面)
- {accept: space, send: space, when: has_menu} #非空碼時,空白還是空白
### 刪除鍵 ###
# - {accept: BackSpace, send: Control+BackSpace, when: has_menu} #〔關〕刪除前一個拼音字符〔開〕:刪除整組拼音字符(一個字)
# - {accept: Shift+BackSpace, send: BackSpace, when: has_menu}
# - {accept: backslash, send: BackSpace, when: has_menu} #「\」鍵位刪除一個拼音字符。
#略# - {accept: backslash, send: Shift+BackSpace, when: has_menu} #「\」鍵位刪除整組拼音字符(一個字)。
# - {accept: backslash, send: Shift+Return, when: has_menu} #「\」鍵位上屏英文。
### 功能快捷鍵 ###
# - {accept: Control+apostrophe, toggle: only_cjk_filter, when: always}
## 上排切換(Mac)
- {accept: Control+Shift+6, toggle: only_cjk_filter, when: always}
- {accept: Control+Shift+7, toggle: emoji_segestion, when: always}
- {accept: Control+Shift+8, toggle: unicode_comment, when: always}
- {accept: Control+Shift+9, toggle: return_mode, when: always}
## 上排切換(Win)
- {accept: Control+Shift+asciicircum, toggle: only_cjk_filter, when: always}
- {accept: Control+Shift+ampersand, toggle: emoji_segestion, when: always}
- {accept: Control+Shift+asterisk, toggle: unicode_comment, when: always}
- {accept: Control+Shift+parenleft, toggle: return_mode, when: always}
## 切換樣態
- {accept: Control+apostrophe, unset_option: only_cjk_filter, when: always}
- {accept: Control+bracketleft, unset_option: emoji_segestion, when: always}
- {accept: Control+minus, set_option: unicode_comment, when: always}
- {accept: Control+equal, set_option: return_mode, when: always}
## 初始樣態(Mac)
- {accept: Control+Shift+apostrophe, set_option: only_cjk_filter, when: always}
- {accept: Control+Shift+bracketleft, set_option: emoji_segestion, when: always}
- {accept: Control+Shift+minus, unset_option: unicode_comment, when: always}
- {accept: Control+Shift+equal, unset_option: return_mode, when: always}
## 初始樣態(Win)
- {accept: Control+Shift+quotedbl, set_option: only_cjk_filter, when: always}
- {accept: Control+Shift+braceleft, set_option: emoji_segestion, when: always}
- {accept: Control+Shift+underscore, unset_option: unicode_comment, when: always}
- {accept: Control+Shift+plus, unset_option: return_mode, when: always}
### Return/Enter鍵上屏(取代 editor/bindings 使可空碼清屏) ###
# - {accept: Return, send: Escape, when: composing} #空碼清屏用
- {accept: Return, send_sequence: "{Escape}{space}", when: composing} #空碼清屏用(測試,如:輸入heart,前面碼有候選項,後面碼無候選項,還是可上屏前面)
- {accept: Return, send: space, when: has_menu} #有選單時 Return/Enter 鍵同空白鍵上屏中文
- {accept: Return, send: space, when: paging} #選字時 Return/Enter 鍵同空白鍵上屏中文
# - {accept: KP_Enter, send: Escape, when: composing} #空碼清屏用
- {accept: KP_Enter, send_sequence: "{Escape}{space}", when: composing} #空碼清屏用(測試,如:輸入heart,前面碼有候選項,後面碼無候選項,還是可上屏前面)
- {accept: KP_Enter, send: space, when: has_menu} #有選單時右側小鍵盤 Return/Enter 鍵同空白鍵上屏中文
- {accept: KP_Enter, send: space, when: paging} #選字時右側小鍵盤 Return/Enter 鍵同空白鍵上屏中文
editor:
bindings:
# space: commit_composition #使用 fluency_editor 時開啟(直接上屏)
# space: toggle_selection #使用 fluency_editor 時開啟(不直接上屏)
# Return: confirm #使用 express_editor 時開啟 #commit_composition
# KP_Enter: confirm #使用 express_editor 時開啟 #commit_composition
Shift+Return: commit_raw_input # 上屏原始輸入
Control+Return: commit_script_text # 上屏變換後輸入
########################## 用正則調出各種功能 ##############################
recognizer:
patterns:
# uppercase: "^[A-Z][-_+.'0-9A-Za-z]*$"
# url: "^(https?:|ftp:|mailto:|file:).*$"
# email: "^[a-z][-_.0-9a-z]*@.*$"
punct: ";;$|[[][[]?'?$|[]][]]?'?$|[[][]]$|[[][[][]][]]$|[[]'[]]'$|[[][[]'[]][]]'$|///?$|===?$|=``?$|=''?$|=''?=''?$|=[][][][]?$|=[][][][]?=[][][][]?$|=[-,./;][-,./;]?$|=,,=[.][.]$|=[0-9]$|=9=0$|==[].,90'[]+$"
# punct: ";;$|[[][[]?'?$|[]][]]?'?$|[[][]]$|[[][[][]][]]$|[[]'[]]'$|[[][[]'[]][]]'$|///?$|===?$|=``?$|=''?$|=''?=''?$|=[][][][]?$|=[][][][]?=[][][][]?$|=[-,./;][-,./;]?$|=,,=[.][.]$|=[0-9]$|=9=0$|==[].,90'[]+$|^e[a-z,./;'][a-z]?[,./;']?$"
emoji_series: "^;[a-z]*$|^;;[-0-9a-z]$|^;[0-9]$|^;[0-9]-[0-9]?$"
reverse2_lookup: "=[a-z]*$"
# lua: "^[a-z][-_.0-9a-z]*@.*$|^(https?:|ftp:|mailto:|file:).*$|(?<![=`])`[a-z]*$|(?<![=`])`[;/'][a-z.,/'-]*$|(?<![=`])`[rq0-9.-][asrvxqwymd0-9.,/()^*+-]*$|(?<![=`])`[xucoi][0-9a-f]+$"
email_url_translator: "^[a-z][-_.0-9a-z]*@.*$|^(https?:|ftp:|mailto:|file:).*$"
mf_translator: "(?<![=`])`[a-z,]*$|(?<![=`])`[;/'][a-z.,/'-]*$|(?<![=`])`[rq0-9.-][asrvxqwymd0-9.,/()^*+-]*$|(?<![=`])`[xucoi][0-9a-f]+$"
# __patch:
# # 使用八股文語言模型
# - grammar:/hant?
# # 用家自選配置
# - bopomo_onion_double.custom:/patch?