-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtiger_chord_popping.schema.yaml
234 lines (210 loc) · 6.89 KB
/
tiger_chord_popping.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
# Rime schema
# encoding: utf-8
schema:
author:
- Hertz Hwang <[email protected]>
dependencies:
- charset
description: |
🐯·单·并击·顶功
name: "虎单·并击·顶功"
schema_id: tiger_chord_popping
version: "2025-01-01"
switches:
- name: ascii_mode
reset: 0
states: [ 虎, 英 ]
- name: extended_char
states: [ 全字集, 常用字 ]
reset: 1
- name: traditionalization
states: [ 简, 繁 ]
- name: full_shape
reset: 0
states: [ 半角, 全角 ]
- name: ascii_punct
reset: 0
states: [ 。,, ., ]
engine:
processors:
- ascii_composer # 处理英文模式及中英文切换
- chord_composer # 处理并击
- recognizer # 与 matcher 搭配,处理符合特定规则的输入码,如网址、反查等
- key_binder # 在特定条件下将按键绑定到其他按键,如重定义逗号、句号为候选翻页键
- lua_processor@*hertz.jane_processor
- lua_processor@*hertz.chord_popping
- speller # 把字母追加到编码串
- punctuator # 处理符号按键
- selector # 选字和换页功能
- navigator # 移动插入点
- express_editor # 空格确认当前输入,其他字符直接上屏
segmentors:
- ascii_segmentor
- matcher
- abc_segmentor # 标记输入码的类型
- punct_segmentor # 割界,与前后方的其他编码区分开
- fallback_segmentor
translators:
- punct_translator # 转换标点符号
- table_translator # 码表转换
filters:
- lua_filter@*hertz.charset_filter # 字集过滤
- simplifier@s2t # 简繁滤镜
- uniquifier # 过滤重复的候选字,可能来自简繁转换
__include: tiger:/s2t_filter # 简繁滤镜
speller:
alphabet: qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM;':"<>?,./~!@#$%^&*()_+-=[]\{}|1234567890
auto_select: false
algebra:
- addrev/([A-Z])/\L$1/
translator:
dictionary: tiger_chord_popping
initial_quality: 1
enable_user_dict: false
enable_charset_filter: false
enable_encoder: false
enable_sentence: false
encode_commit_history: false
enable_completion: true
comment_format:
- xform/~//
key_binder:
import_preset: default
custom_bindings:
__append:
# 在這裏添加只在本方案中生效的按鍵綁定
bindings:
__patch:
- tiger:/keys/page_up_down
#- tiger:/keys/selector
- tiger:/keys/options_toggle
recognizer:
import_preset: default
patterns:
punct: '^/([0-9]0?|[a-zA-Z]+)$'
reverse_lookup: "^`[a-z]*'?$"
expression: '^=.*$'
punctuator:
#import_preset:
__include: tiger:/punctuator
menu:
page_size: 9
chord_composer:
alphabet: qazwsxedcrfvtgbyhnujmik,ol.p;/ `
algebra: # 来自猫师自然码并击指法
- xlit|;,./|ACXZ| # 符号映射为大写字母,分离其转义干扰
- xlit| |一| # 主空格
- xform/^([qwertasdfgzxcvb]+)([一]*)$/$1_$2/ # 处理左手击的表示
- xform/^([yuiophjklAnmCXZ]+)([一]*)$/_$1$2/ # 处理右手击的表示
- xform/^([qwertasdfgzxcvb]+)([yuiophjklAnmCXZ]+)([一]*)$/$1$2$3/ # 合并单手击的表示
- xform/([qwertasdfgzxcvb]+)/<$1>/ # 左手编码包装
- xform/([yuiophjklAnmCXZ]+)/<$1>/ # 右手编码包装
- xform/([一]+)/<$1>/ # 空格区编码包装
# 字母
- xform=(<zv>|<mZ>)=Q=
- xform=(<wv>|<no>)=W=
- xform=(<ev>|<ni>)=E=
- xform=(<et>|<yi>)=R=
- xform=(<qt>|<yp>)=T=
- xform=(<wt>|<yo>)=Y=
- xform=(<af>|<jA>)=U=
- xform=(<xv>|<mX>)=I=
- xform=(<aw>|<oA>)=O=
- xform=(<qf>|<jp>)=P=
- xform=(<wer>|<uio>)=/=
- xform=(<qwe>|<iop>)=\=
- xform=(<rt>|<yu>)=[=
- xform=(<ert>|<yui>)=]=
- xform=(<av>|<nA>)=A=
- xform=(<sv>|<nl>)=S=
- xform=(<dv>|<nk>)=D=
- xform=(<sg>|<hl>)=F=
- xform=(<dg>|<hk>)=G=
- xform=(<ar>|<uA>)=H=
- xform=(<xf>|<jX>)=J=
- xform=(<xc>|<CX>)=K=
- xform=(<sr>|<ul>)=L=
- xform=(<dc>|<mk>)=~=
- xform=(<fv>|<nj>)=|=
- xform=(<fg>|<hj>)=(=
- xform=(<dfg>|<hjk>)=)=
- xform=(<zf>|<jZ>)=Z=
- xform=(<xd>|<kX>)=X=
- xform=(<xb>|<nX>)=C=
- xform=(<zs>|<lZ>)=V=
- xform=(<qw>|<op>)=B=
- xform=(<se>|<il>)=N=
- xform=(<wd>|<ko>)=M=
- xform=(<at>|<yA>)=<=
- xform=(<ag>|<hA>)=>=
- xform=(<zx>|<XZ>)=@=
- xform=(<vb>|<nm>)=$=
- xform=(<q>|<p>)=q=
- xform=(<w>|<o>)=w=
- xform=(<e>|<i>)=e=
- xform=(<r>|<u>)=r=
- xform=(<t>|<y>)=t=
- xform=(<ef>|<ji>)=y=
- xform=(<er>|<ui>)=u=
- xform=(<we>|<io>)=i=
- xform=(<wr>|<uo>)=o=
- xform=(<qr>|<up>)=p=
- xform=(<qe>|<ip>)=%=
- xform=(<wg>|<ho>)=-=
- xform/(<qg>|<hp>)/=/
- xform=(<a>|<A>)=a=
- xform=(<s>|<l>)=s=
- xform=(<d>|<k>)=d=
- xform=(<f>|<j>)=f=
- xform=(<g>|<h>)=g=
- xform=(<wf>|<jo>)=h=
- xform=(<df>|<jk>)=j=
- xform=(<sd>|<kl>)=k=
- xform=(<sf>|<jl>)=l=
- xform=(<as>|<lA>)=:=
- xform=(<ad>|<kA>)=;=
- xform=(<asd>|<klA>)='=
- xform=(<adf>|<jkA>)="=
- xform=(<rf>|<uj>)=_=
- xform=(<rg>|<hu>)={=
- xform=(<eg>|<hi>)=}=
- xform=(<z>|<Z>)=z=
- xform=(<x>|<X>)=x=
- xform=(<c>|<C>)=c=
- xform=(<v>|<m>)=v=
- xform=(<b>|<n>)=b=
- xform=(<sc>|<Cl>)=n=
- xform=(<cv>|<mC>)=m=
- xform=(<sdf>|<jkl>)=,=
- xform=(<wef>|<jio>)=.=
- xform=(<sef>|<jil>)=!=
- xform=(<zb>|<nZ>)=?=
- xform=(<zc>|<CZ>)=#=
- xform=(<zxc>|<CXZ>)=*=
- xform=(<xcv>|<mCX>)=&=
- xform=(<cvb>|<nmC>)=+=
- xform|(.)_<一>|<"1>$1_|
- xform|_(.)<一>|<"1>_$1|
- xform|(..)<一>|<"1>$1|
- xform|^<一>|<1>|
- xform/<1>/ /
- xform/<"1>/"/
- xform/"([a-zA-Z])f$/$1/ # 左大小写 + 右j + 空格,为补第三码
- xform/"f([a-zA-Z])$/$1/ # 左f + 右大小写 + 空格,为补第三码
- xform/^.*<.+>.*$//
- xform=,="""",=
- xform=。="""".=
- xform=!=""""!=
- xform=?=""""?=
prompt_format:
# 码元显示效果修正
- xform/"""",$/,/
- xform/""""\.$/。/
- xform/""""!$/!/
- xform/""""\?$/?/
popping:
popping_with: "QWERTYYUIOPASDFGHJKLZXCVBNM" # 顶功集合码,通常为形码
min_length: 4 # 无顶功码自动上屏的长度
max_length: 4 # 全码上屏的长度
auto_clear: false # 顶功空码时是否清空输入
popping_command: true # 为true时,首码为顶码时禁用顶功逻辑(如orq)