-
Notifications
You must be signed in to change notification settings - Fork 23
/
flypy_xhfast.custom.yaml
222 lines (197 loc) · 9.07 KB
/
flypy_xhfast.custom.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
## 一些常用的设置项, 找到需要进行的设置所在的行,
## 取消注释 (删除行开头的单个 # 符号) 即可启用该设置项.
## 注意不要删除前面的空格, YAML 文件的缩进比较严格, 缩进不对容易报错.
---
patch:
# 候选菜单
menu/+:
# 注释掉下行以恢复常规候选标签序号
alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⓪ ]
# alternative_select_keys: 1234567890 # 候选项选中快捷键
page_size: 7 # 自定义候选项个数
# 候选菜单布局样式
style/+:
font_point: 12 # 候选字大小
line_spacing: 6 # 行间距大小
inline_preedit: true # 编码位是否嵌入候选框
text_orientation: horizontal # 候选文字横向(horizontal)/纵向(vertical)
candidate_list_layout: linear # 候选菜单横向(linear)/纵向(stacked)
switches/+:
- name: emoji
states: [🈚️, 😄]
reset: 1
- name: charset
states: [通用, 增廣]
reset: 1
- name: prediction
states: [联想关, 联想开]
- name: char_mode
states: [单字模式关, 单字模式开]
- name: charset_hint
states: [码区提示关, 码区提示开]
engine/+:
processors/+:
segmentors/+:
translators/+:
filters/+:
'engine/processors/@next': predictor
'engine/translators/@before 0': predict_translator
# 注释下行, 以取消中英混合的候选词条里自动添加的空格
'engine/filters/@before last': lua_filter@*word_append_space*filter
# 注释下行, 以取消中英混合输出上屏时自动添加的前导空格
# 'engine/processors/@after 1': lua_processor@*word_append_space*processor
key_binder/+:
import_preset: default # 从 default.yaml 继承通用的
# search: "`" # 辅码引导符
char_mode_suffix: "|" # 单字优先触发后缀(四码词组->四码单字)
char_mode: "Control+s" # 单字模式
pin_cand: "Control+t" # 候选词置顶
unpin_cand: "Control+t" # 候选词取消置顶
drop_cand: "Control+d" # 强制删词, 无视输入的编码
hide_cand: "Control+x" # 匹配当前输入码后隐藏指定的候选字词
reduce_fq_cand: "Control+j" # 匹配当前输入码后降频指定的候选字词
switch_comment: "Control+n" # 切换注释(小鹤形码 / 带调拼音 / 无)
commit_comment: "Control+p" # 注释上屏
switch_english: "Control+g" # 切换到英文输入方案
expand_abbr_py: "Control+0" # 展开超级简拼(开启时生效)
remove_user_word: "Control+r" # 用户词典里的字词调频为负
easydict_translate: "Control+y" # 调用 Easydict 翻译高亮字词
# select_first_character: "minus" # `-` 以词定字(第一个字)
# select_last_character: "equal" # `=` 以词定字(最后一个字)
select_first_character: "bracketleft" # `[` 以词定字(首字)
select_last_character: "bracketright" # `]` 以词定字(尾字)
enclosed_cand_chars_a: "Shift+Control+7" # 上屏「高亮字词」
enclosed_cand_chars_b: "Shift+Control+8" # 上屏【高亮字词】
enclosed_cand_chars_c: "Shift+Control+9" # 上屏(高亮字词)
enclosed_cand_chars_d: "Shift+Control+0" # 上屏〔高亮字词〕
bindings/+:
- {when: has_menu, accept: Tab, send: Right}
- {when: composing, accept: Tab, send: Right}
- {when: composing, accept: grave, send: "`"} # `键 逐字追加辅码
- {when: has_menu, accept: semicolon, send: 2} # 分号用于第2候选
- {when: has_menu, accept: apostrophe, send: 3} # 单引号用于第3候选
- {when: paging, accept: comma, send: Page_Up} # 逗号, 返回上一页
- {when: has_menu, accept: period, send: Page_Down} # 句号. 下一页
# - {when: paging, accept: minus, send: Page_Up} # 减号- 返回上一页
# - {when: has_menu, accept: equal, send: Page_Down} # 等号= 下一页
# - {when: has_menu, accept: Tab, send: Control+Right}
# - {when: composing, accept: Tab, send: Control+Right}
- {when: composing, accept: Shift+Tab, send: Control+Left}
- {when: composing, accept: Control+i, send: Control+Left}
- {when: composing, accept: Control+o, send: Control+Right}
- {when: composing, accept: Control+w, send: Control+BackSpace}
- {when: always, accept: Control+Shift+g, select: easy_en}
- {when: has_menu, accept: Control+Shift+4, toggle: emoji}
- {when: has_menu, accept: Control+Shift+5, toggle: charset_hint}
- {when: has_menu, accept: Control+Shift+6, toggle: traditionalize}
recognizer/+:
patterns/+:
timestamp: "^/uts$" # 时间戳
week: "^(/wk|week)$"
time: "^(/wt|time)$"
date: "^(/wd|date)$"
history: "^(/hs|hH)$" # 上屏历史
LaTeX: "^(/lt|lT)(.*)$" # LaTeX排版
flypy_help: "^(/oh|oH)$" # 帮助菜单
calculator: "^(/=|cC)(.*)$" # 简易计算器
switch_options: "^(/so|sO)$" # 切换配置选项
flypy_key_help: "^/ok[a-z]*$" # 双拼键位帮助
shortcuts: "^/(fj|kj)[a-z]*$" # 快捷指令(短语)
easy_en: "(/oe|eN)[a-zA-Z*]+'?$" # 英文方案(带中文)
radical_lookup: "^(~|rL)[a-z]+'?$" # 单字部件拆字组字
chinese_lunar: "^(/nl|nL)[0-9]*$" # 中国农历(可反查)
chinese_number: "^(/cn|Nn)[0-9.]+$" # 中文大写数字(金额)
punctuator/+:
symbols/+:
full_shape/+:
half_shape/+:
# '"': {pair: ['‘', '’']}
# "'": {pair: ['“', '”']}
# ";": {commit: ";"} # 恢复默认分号, 取消注释
";": [";", ";"] # 添加注释, 以恢复默认分号
'\': ['、', '、', '\', '\', '\r', '\n', '\t']
"@":
- "@"
# - "@xxx.com"
- "@gmail.com"
- "@foxmail.com"
- "@outlook.com"
- "@hotmail.com"
- "@qq.com"
- "@163.com"
- "@139.com"
speller/+:
auto_commit: true # 二字词组加辅码唯一时则自动上屏
algebra/+:
# - derive|/|| # 取消注释,直接辅码(新手不推荐)
## 模糊音:
# - derive/^([jqxy])v/$1u/
# - derive/^([jqxy])u/$1v/
# - derive/^l(.*)/n$1/ # l => n
# - derive/^n(.*)/l$1/ # n => l
# - derive/^v(.*)/z$1/ # zh => z
# - derive/^i(.*)/c$1/ # ch => c
# - derive/^u(.*)/s$1/ # sh => s
# - derive/^(.*)k/$1b/ # ing => in
# - derive/^(.*)g/$1f/ # [zcs][h]eng => [zcs][h]en
# - derive/^(.*)f/$1g/ # [zcs][h]en => [zcs][h]eng
flypy_key_help/+: # 小鹤双拼键位帮助
prefix: "/ok"
tips: "双拼查键"
custom_phrase/+: # 自定义短语
comment_mark: " 📌" # 注解标记
pin_word: # 词条置顶配置
word_quality: 1000
comment_mark: " 🔝" # 置顶词标记
char_mode: # 单字模式开关
toggle: "off"
pair_symbol: # 符号配对开关
toggle: "off"
emoji_reduce: # Emoji 降频
index: 6 # 到 index 位置
cold_word_reduce: # 高亮词条降频
index: 4 # 到 index 位置
excluded_types: ["easy_en"]
LaTeX: # LaTeX 公式输入
tag: LaTeX
# prefix: "lT"
prefix: "/lt"
tips: "LaTeX 公式"
history: # 上屏历史记录
tag: history
# prefix: "hH"
prefix: "/hs"
tips: "上屏历史"
max_count: 99
initial_quality: 999
comment_max_length: 9
excluded_types: ["punct"]
calculator: # 简易计算器
tag: calculator
# prefix: "cC"
prefix: "/="
tips: "计算器"
chinese_number: # 中文大写数字(金额)
# prefix: "Nn"
prefix: "/cn"
suffix: "'"
tips: "中文数字"
tag: chinese_number
select_keys: "HJKLNM"
easy_en/+: # 英文单词输入方案
# prefix: "eN"
prefix: "/oe"
tips: "英文"
wildcard: '*'
expan_word_count: 666 # 模糊匹配最多迭代数
radical_lookup/+: # 单字部件拆字组字
# prefix: "rL"
prefix: "~"
tips: 部件组字
radical_reverse_lookup/+: # 部件组字反查拼音
overwrite_comment: false
dictionary: kMandarin # 可自行更换反查词典
predictor: # 候选字词联想预测
db: predict.db
max_candidates: 7 # 联想的候选项个数
max_iterations: 1 # 联想预测的次数