-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathxkjd6.schema.yaml
283 lines (267 loc) · 8.57 KB
/
xkjd6.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
# Rime schema settings
# encoding: utf-8
# 显示全拼功能:
# - 缺陷:
# - 例如,输入 xh 显示 「ai | xue」,无法分辨为「学」或「爱」字
# - 仅对单字与两字词组生效,三字及以上词组无法正确显示
# - 关闭:若想取消该功能,可以删除 「preedit_format:」至 「xlit」该行,
# 或是将 「 - erase/^.*/」取消注释
schema:
schema_id: xkjd6
name: 键道6
version: "1"
dependencies:
- xkjd6cx
switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: jffh
reset: 0
states: [ 简体, 繁體 ]
- name: wxw_prompt
reset: 1
states: [ 630关, 630开 ]
- name: sbb_disable_full
reset: 0 # 改成1默认关闭全码
states: [ "开₆₃₀全码", "关₆₃₀全码" ]
- name: EN2en
reset: 1
- name: topup_hint
reset: 1
states: [ "关顶功提示", "开顶功提示" ]
punctuator:
full_shape:
' ' : { commit: ' ' }
',' : { commit: , }
'.' : { commit: 。 }
'<' : [ 《, 〈, «, ‹ ]
'>' : [ 》, 〉, », › ]
'?' : { commit: ? }
'/' : { commit: ? }
';' : { commit: ; }
':' : { commit: : }
'''' : { pair: [ '‘', '’' ] }
'"' : { pair: [ '“', '”' ] }
'\' : [ 、, \ ]
'|' : [ ·, |, '§', '¦' ]
'`' : `
'~' : ~
'!' : { commit: ! }
'@' : @
'#' : #
'%' : [ %, '°', '℃' ]
'$' : [ ¥, '$', '€', '£', '¥', '¢', '¤' ]
'^' : { commit: …… }
'&' : &
'*' : [ *, ·, ・, ×, ※, ❂ ]
'(' : (
')' : )
'-' : '-'
'_' : ——
'+' : '+'
'=' : '='
'[' : [ 「, 【, 〔, [ ]
']' : [ 」, 】, 〕, ] ]
'{' : [ 『, 〖, { ]
'}' : [ 』, 〗, } ]
half_shape:
',' : { commit: , }
'.' : { commit: 。 }
'<' : [ 《, 〈, «, ‹ ]
'>' : [ 》, 〉, », › ]
'?' : { commit: ? }
'/' : { commit: ? }
';' : { commit: ; }
':' : { commit: : }
'''' : { pair: [ '‘', '’' ] }
'"' : { pair: [ '“', '”' ] }
'\' : [ 、, '\', \ ]
'|' : [ ·, '|', |, '§', '¦' ]
'`' : '`'
'~' : [ '~', ~ ]
'!' : { commit: ! }
'@' : '@'
'#' : '#'
'%' : [ '%', %, '°', '℃' ]
'$' : [ ¥, '$', '€', '£', '¥', '¢', '¤' ]
'^' : { commit: …… }
'&' : '&'
'*' : [ '*', *, ·, ・, ×, ※, ❂ ]
'(' : (
')' : )
'-' : '-'
'_' : ——
'+' : '+'
'=' : '='
'[' : [ 「, 【, 〔, [ ]
']' : [ 」, 】, 〕, ] ]
'{' : [ 『, 〖, { ]
'}' : [ 』, 〗, } ]
engine:
processors:
- ascii_composer
- recognizer
- key_binder
- speller
- punctuator
- selector
- navigator
- express_editor
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor
- punct_segmentor
- fallback_segmentor
translators:
- punct_translator
- table_translator@custom_phrase
- reverse_lookup_translator
- table_translator
- lua_translator@date_time_translator
filters:
- simplifier
- uniquifier
- simplifier@emoji_cn
- simplifier@jffh
- simplifier@bmms
- simplifier@wxw_prompt
- simplifier@EN2en
- reverse_lookup_translator
speller:
auto_select: true
alphabet: "zyxwvutsrqponmlkjihgfedcba;"
initials: "abcdefghijklmnopqrstuvwxyz;"
translator:
dictionary: xkjd6.extended
enable_charset_filter: false
enable_completion: true
enable_encoder: true
enable_sentence: false
enable_user_dict: false
encode_commit_history: true
max_phrase_length: 6
preedit_format:
# - erase/^.*/
- xform/([bcdefghjklmnpqrstwxyz]{3})([bcdefghjklmnpqrstwxyz])/$1\u$2/
- xform/^([bcdefghjklmnpqrstwxyz])([bcdefghjklmnpqrstwxyz])/$1\u$2'/
- xform/(^|[a-z][a-z])?x(F|P|Z|E|N|R|J|H)/$1V$2/
- xform/(^|[a-z][a-z])?([bdjlmnpqtxy])G/$1$2ING/
- xform/(^|[a-z][a-z])?([fw])G/$1$2[0]UAI/
- xform/(^|[a-z][a-z])?([eghk])G/$1$2UAI/
- xform/(^|[a-z][a-z])?(\w)M/$1$2IAN/
- xform/(^|[a-z][a-z])?(\w)C/$1$2IAO/
- xform/(^|[a-z][a-z])?([jlnqx])X/$1$2IANG/
- xform/(^|[a-z][a-z])?([fw])X/$1$2[0]UANG/
- xform/(^|[a-z][a-z])?([ghke])X/$1$2UANG/
- xform/(^|[a-z][a-z])?([djlmnqx])Q/$1$2IU/
- xform/(^|[a-z][a-z])?([eghkr])Q/$1$2UA/
- xform/(^|[a-z][a-z])?([fw])Q/$1$2[0]UA/
- xform/(^|[a-z][a-z])?([Vcdghklmnrstyze])E/$1$2E/
- xform/(^|[a-z][a-z])?([fqjw])E/$1$2[0]E/
- xform/(^|[a-z][a-z])?([qj])R/$1$2[0]ENG/
- xform/(^|[a-z][a-z])?([jq])N/$1$2[0]EN/
- xform/(^|[a-z][a-z])?([Vbcfghkmnprswze])N/$1$2EN/
- xform/(^|[a-z][a-z])?([bcdVfghklmnprstwze])R/$1$2ENG/
- xform/(^|[a-z][a-z])?([fw])T/$1$2[0]UAN/
- xform/(^|[a-z][a-z])?([cdghjklnqrstxyz])T/$1$2UAN/
- xform/(^|[a-z][a-z])?(V)J/$1VER/$
- xform/(^|[a-z][a-z])?([jq])J/$1$2[0]U/
- xform/(^|[a-z][a-z])?([Vebcdfghjklmnpqrstwxyz])J/$1$2U/
- xform/(^|[a-z][a-z])?([cdghklnrstyz])Y/$1$2ONG/
- xform/(^|[a-z][a-z])?([fw])Y/$1$2[0]ONG/
- xform/(^|[a-z][a-z])?([jqx])Y/$1$2IONG/
- xform/(^|[a-z][a-z])?([jq])P/$1$2[0]ANG/
- xform/(^|[a-z][a-z])?([Vbcdfghklmnprstwyze])P/$1$2ANG/
- xform/(^|[a-z][a-z])?([jq])S/$1$2IA/
- xform/(^|[a-z][a-z])?([x])S/$1$2IA \| $1A/
- xform/(^|[a-z][a-z])?([fw])S/$1$2A \| $1$2[0]A/
- xform/(^|[a-z][a-z])?([bcdghklmnpstyze])S/$1$2A/
- xform/(^|[a-z][a-z])?([cghkprsetyz])D/$1$2OU/
- xform/(^|[a-z][a-z])?([fw])D/$1$2[0]OU \| $1$2OU/
- xform/(^|[a-z][a-z])?([bpjqtx])D/$1$2IE/
- xform/(^|[a-z][a-z])?([dlmn])D/$2IE \| $2OU/
- xform/(^|[a-z][a-z])?([jq])F/$1$2[0]AN/
- xform/(^|[a-z][a-z])?([Vbcdfghklmnprstwyze])F/$1$2AN/
- xform/(^|[a-z][a-z])?([bcdmpstzhgkewh])H/$1$2AI/
- xform/(^|[a-z][a-z])?([f])H/$2[0]AI/
- xform/(^|[a-z][a-z])?([y])H/$1$2UE/
- xform/(^|[a-z][a-z])?([jq])H/$1$2UE \| $2[0]AI/
- xform/(^|[a-z][a-z])?([nl])H/$1$2AI \| $1$2vE/
- xform/(^|[a-z][a-z])?([V])H/$1AI \| $1XUE/
- xform/(^|[a-z][a-z])?([fw])K/$1$2[0]I/
- xform/(^|[a-z][a-z])?([bcdeghjklmnpqrstxyz])K/$1$2I/
- xform/(^|[a-z][a-z])?([bmp])L/$1$2O/
- xform/(^|[a-z][a-z])?([cdeghkzrst])L/$1$2UO/
- xform/(^|[a-z][a-z])?([qj])L/$1$2v/
- xform/(^|[a-z][a-z])?([l])L/$1$2v \| $1$2O \| $1$2UO/
- xform/(^|[a-z][a-z])?([n])L/$1$2v \| $1$2UO/
- xform/(^|[a-z][a-z])?([x])L/$1$2v \| $1O/
- xform/(^|[a-z][a-z])?([y])L/$1$2u \| $2O/
- xform/(^|[a-z][a-z])?([fw])L/$2O \| $2[0]UO/
- xform/(^|[a-z][a-z])?([ecdghkrstz])L/$1$2UO/
- xform/(^|[a-z][a-z])?([jwfq])Z/$2[0]AO/
- xform/(^|[a-z][a-z])?([Vbcdghklmnprstyze])Z/$1$2AO/
- xform/(^|[a-z][a-z])?([bjlmnpqxy])B/$2IN/
- xform/(^|[a-z][a-z])?([fw])B/$1$2[0]UI/
- xform/(^|[a-z][a-z])?([cdghkrstze])B/$2UI/
- xform/(^|[a-z][a-z])?([bmnp])W/$1$2EI/
- xform/(^|[a-z][a-z])?([fw])W/$2EI/
- xform/(^|[a-z][a-z])?([ckrsty])W/$1$2UN/
- xform/(^|[a-z][a-z])?([deghjlqxz])W/$1$2EI \| $1$2UN/
- xform/e(\w)/sH$1/
- xform/q\[0\](\w)/zh$1/
- xform/f\[0\](\w)/zh$1/
- xform/j\[0\](\w)/ch$1/
- xform/w\[0\](\w)/ch$1/
- xform/V(\w)/$1/
- 'xlit|BPMFDTNLGKHJQXZCSRZCSIUVAOE|bpmfdtnlgkhjqxzcsrzcsiuvaoe'
emoji_cn:
opencc_config: emoji.json
option_name: emoji_cn
tips: all
jffh:
opencc_config: s2tw.json
option_name: jffh
wxw_prompt:
opencc_config: wxwprompt.json
option_name: wxw_prompt
show_in_comment: true
comment_format:
- "xform/^([bcdefghjklmnpqrstwxyz]{2,4})([avuio]{0,3})_(.+)$/〔$3, $1$2〕/"
- xform/^([a-z]+)$/$2/
tips: all
EN2en:
opencc_config: EN2en.json
option_name: EN2en
bmms:
opencc_config: pinyin.json
option_name: bmms
show_in_comment: true
comment_format:
- xform/'/ /
reverse_lookup:
dictionary: xkjd6cx
comment_format:
- xform/^/〔/
- xform/$/〕/
- xform/ /, /
punctuator:
import_preset: symbols
key_binder:
bindings:
- {accept: minus, send: Page_Up, when: has_menu}
- {accept: equal, send: Page_Down, when: has_menu}
- { when: always, accept: F6, select: .next }
- { when: always, accept: F7, toggle: jffh }
- { when: has_menu, accept: "'", send: 2 }
- { when: has_menu, accept: "&", toggle: emoji_cn}
- { when: has_menu, accept: "^", toggle: bmms}
recognizer:
import_preset: default
patterns:
reverse_lookup: "[a-z`]*`+[a-z`]*"
punct: "^/([0-9]0?|[a-z]+)$"