-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrime.yaml
401 lines (375 loc) · 17.7 KB
/
trime.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
# Trime default style settings
# encoding: utf-8
config_version: '3.0'
name: 預設 #方案名稱
author: osfans #作者資訊
style:
auto_caps: ascii #自動句首大寫:true|false|ascii
background_dim_amount: 0.5
candidate_font: han.ttf #候選字型
candidate_spacing: 1 #候選間距
candidate_use_cursor: true #高亮候選項
candidate_view_padding_top: 8
color_scheme: default #配色方案
comment_font: comment.ttf #編碼提示字型
hanb_font: hanb.ttf #擴充字型
horizontal: true #水平模式
horizontal_gap: 5 #鍵水平間距
keyboard_padding: 5 #屏幕左右两侧与键盘的距离
key_font: symbol.ttf #鍵盤字型
key_height: 44 #鍵高
key_long_text_size: 16 #長標籤字號
key_text_size: 24 #鍵字號
key_width: 10.0 #鍵寬,佔螢幕寬的百分比
keyboards: [.default, letter, symbols1, symbols2, number, stroke] #鍵盤配置:自動鍵盤、字母、數字、符號
label_text_size: 24 #標籤字號
label_font: label.ttf #編標籤字型
latin_font: latin.ttf #西文字型
latin_locale: en_US #西文語言
locale: zh_HK #預設語言 zh_TW,zh_CN,zh_HK,''
preview_font: latin.ttf #按鍵提示字型
proximity_correction: true #按鍵糾錯
reset_ascii_mode: false #顯示鍵盤時重置爲中文狀態
round_corner: 16 #按鍵圓角半徑
shadow_radius: 0.0 #按鍵陰影半徑
symbol_font: symbol.ttf #符號字型
symbol_text_size: 10 #符號字號
text_font: latin.ttf #編碼字型
#text_height: 22 #編碼區高度
text_size: 18 #編碼區字號
vertical_correction: -10
vertical_gap: 10 #鍵盤行距
long_text_font: comment.ttf #剪贴板等可能包含大段文本使用的字体
#background_folder: #背景图保存在background目录下的哪个子目录
key_long_text_border: 1
key_symbol_offset_x: 1
key_hint_offset_x: -1
enter_label_mode: 0 #是否使用App提供的ActionLabel内容作为Enter键的文本(由于多数App没有适配ActionLable,实际影响不大)。0不使用,1只使用actionlabel,2优先使用,3当其他方式没有获得label时才读取actionlabel
enter_labels: # 定义Enter键的文本
go: '➲'
done: '✓'
next: '⧁'
pre: '⧀'
search: '🔍︎'
send: '⮚'
default: '⤶' # 定义默认Enter键的文本
layout: #懸浮窗口設置
position: fixed #位置:left|right|left_up|right_up|fixed|bottom_left|bottom_right|top_left|top_right(left、right需要>=Android5.0)
margin_x: 7 #水平邊距
margin_y: 0 #豎直邊距
margin_bottom: 4 #底部边距
real_margin: 3 #屏幕左右边缘和悬浮窗之间的距离
alpha: 0xff #透明度(0-255)
movable: false #是否可移動窗口,或僅移動一次 true|false|once
window: #懸浮窗口組件
- {composition: true}
fallback_colors:
candidate_text_color: text_color
comment_text_color: candidate_text_color
border_color: back_color
candidate_separator_color: border_color
hilited_text_color: text_color
hilited_back_color: back_color
hilited_candidate_text_color: hilited_text_color
hilited_candidate_back_color: hilited_back_color
hilited_label_color: hilited_candidate_text_color # 高亮候选序号 颜色
hilited_comment_text_color: comment_text_color
hilited_key_back_color: hilited_candidate_back_color
hilited_key_text_color: hilited_candidate_text_color
hilited_key_symbol_color: hilited_comment_text_color
hilited_off_key_back_color: hilited_key_back_color
hilited_on_key_back_color: hilited_key_back_color
hilited_off_key_text_color: hilited_key_text_color
hilited_on_key_text_color: hilited_key_text_color
key_back_color: back_color
key_border_color: border_color
key_text_color: candidate_text_color
key_symbol_color: comment_text_color
label_color: candidate_text_color
off_key_back_color: key_back_color
off_key_text_color: key_text_color
on_key_back_color: hilited_key_back_color
on_key_text_color: hilited_key_text_color
preview_back_color: key_back_color
preview_text_color: key_text_color
shadow_color: border_color
root_background: back_color # 整个键盘区+候选栏的背景图/色
candidate_background: back_color #候选栏的整体背景图/色
keyboard_back_color: border_color #键盘去的背景图/色
liquid_keyboard_background: keyboard_back_color # liquidKeyboard的背景图/色
text_back_color: back_color #编码区背景,即悬浮窗背景
long_text_back_color: key_back_color #长文本按键的背景(剪贴板)
preset_color_schemes:
default:
name: Default
light_scheme: default_light
dark_scheme: default_dark
default_light:
name: Default Light
back_color: 0xeaecef #候選區背景
shadow_color: 0xff1a1e24 #按鍵文字陰影
border_color: 0xa1a6ad #邊框
text_color: 0x1a1e24 #編碼
comment_text_color: 0x878e99 #提示
hilited_key_symbol_color: 0x1a1e24 #標明按鍵符號
text_back_color: 0xcceaecef #編碼區背景
keyboard_back_color: 0xeaecef #鍵盤背景
key_back_color: 0xffffff #按鍵背景
off_key_back_color: 0xd5d9de #按鍵關閉狀態背景
on_key_back_color: 0x78c2f0 #按鍵打開狀態背景
preview_back_color: 0xffd5d9de #按鍵提示背景
hilited_key_back_color: 0xa1a6ad #標明按鍵背景
hilited_candidate_back_color: 0xd5d9de #標明候選背景
default_dark:
name: Default Dark
back_color: 0x17191c
shadow_color: 0xff878e99
border_color: 0x494b4f
text_color: 0xf5f5f7
comment_text_color: 0x878e99
hilited_key_symbol_color: 0xf5f5f7
text_back_color: 0xcc17191c
keyboard_back_color: 0x17191c
key_back_color: 0x35383d
off_key_back_color: 0x494b4f
on_key_back_color: 0xa7cceb
preview_back_color: 0xff494b4f
hilited_key_back_color: 0x6a6e75
hilited_candidate_back_color: 0x494b4f
preset_keys:
# 編輯
Shift_L: {label: '⇧', send: Shift_L, shift_lock_label: '⇪'}
Return: {label: enter_labels, send: Return}
Return1: {label: '↩', send: Return}
Hide: {label: Hide, send: BACK}
BackSpace: {label: '⌫', repeatable: true, send: BackSpace}
space: {repeatable: false, functional: false, send: space}
Escape: {label: ' ', send: Escape}
Escape1: {label: 'Clear', send: Escape}
Escape2: {label: 'Back', send: '{Escape}{Escape}'}
Home: {label: 'Home', send: Home}
Insert: {label: 'Insert', send: Insert}
Delete: {label: 'Delete', send: Delete}
End: {label: 'End', send: End}
Page_Up: {label: 'PgUp', send: Page_Up}
Page_Down: {label: 'PgDn', send: Page_Down}
Left: {label: '←', send: Left}
Down: {label: '↓', send: Down}
Up: {label: '↑', send: Up}
Right: {label: '→', send: Right}
select_all: {label: 'All', send: Control+a}
cut: {label: 'Cut', send: Control+x}
copy: {label: 'Copy', send: Control+c}
paste: {label: 'Paste', send: Control+v}
redo: {label: '⟳', send: Control+Shift+z} #>=Android 6.0
undo: {label: '⟲', send: Control+z} #>=Android 6.0
# rime組合鍵
F4: {label: 'Schema', send: F4}
SeparateSyllable: {label: '分', functional: false, send: apostrophe}
BackToPreviousSyllable: {label: ' ', send: Control+BackSpace}
CommitRawInput: {label: ' ', send: Control+Return}
CommitScriptText: {label: ' ', send: Shift+Return}
CommitComment: {label: ' ', send: Control+Shift+Return}
DeleteCandidate: {label: ' ', send: Control+Delete}
# rime狀態
Mode_switch: {toggle: ascii_mode, send: Mode_switch, states: [ 中文, 英文 ]}
Zenkaku_Hankaku: {toggle: full_shape, send: Mode_switch, states: [ 半形, 全形 ]}
Henkan: {toggle: simplification, send: Mode_switch, states: [ 繁體, 简体 ]}
Punct_switch: {toggle: ascii_punct, send: Mode_switch, states: [ 。,, ., ]}
# 切换键盘
Keyboard_symbols1: {label: '?123', send: Eisu_toggle, select: symbols1}
Keyboard_symbols2: {label: '^[+', send: Eisu_toggle, select: symbols2}
Keyboard_number: {label: '123', send: Eisu_toggle, select: number}
Keyboard_letter: {label: 'ABC', send: Eisu_toggle, select: default}
Keyboard_default: {label: 'ABC', send: Eisu_toggle, select: .default}
Keyboard_switch: {label: 'Keyboard', send: Eisu_toggle, select: .next}
# trime設定
IME_switch: { label: ' ', send: LANGUAGE_SWITCH } #彈出對話框選擇輸入法
IME_next: { label: 🌐, send: LANGUAGE_SWITCH, select: .next } #直接切換到下一輸入法
Color_switch: {label: 'Color', send: PROG_RED}
Help: {label: 'Help', send: Help}
Info: {label: 'Info', send: INFO}
Menu: {label: 'Schema', send: Menu}
Settings: {label: 'Settings', send: SETTINGS}
Color_settings: {label: 'Color', send: SETTINGS, option: 'color'}
Theme_settings: {label: 'Theme', send: SETTINGS, option: 'theme'}
Schema_settings: {label: 'Schema', send: SETTINGS, option: 'schema'}
preset_keyboards:
default:
name: Letter
ascii_mode: 0
width: 10
height: 44
lock: true
keys:
- {click: 'q', long_click: '1', cangjie_label: '手', has_menu_hint: '3/6'}
- {click: 'w', long_click: '2', cangjie_label: '田'}
- {click: 'e', long_click: '3', cangjie_label: '水'}
- {click: 'r', long_click: '4', cangjie_label: '口'}
- {click: 't', long_click: '5', cangjie_label: '廿'}
- {click: 'y', long_click: '6', cangjie_label: '卜'}
- {click: 'u', long_click: '7', cangjie_label: '山'}
- {click: 'i', long_click: '8', cangjie_label: '戈'}
- {click: 'o', long_click: '9', cangjie_label: '人'}
- {click: 'p', long_click: '0', cangjie_label: '心'}
- {width: 5}
- {click: 'a', long_click: '$', cangjie_label: '日'}
- {click: 's', long_click: '……', ascii_long_click: '…', cangjie_label: '尸'}
- {click: 'd', long_click: '——', ascii_long_click: '-', cangjie_label: '木'}
- {click: 'f', long_click: '(', ascii_long_click: '(', cangjie_label: '火'}
- {click: 'g', long_click: ')', ascii_long_click: ')', cangjie_label: '土'}
- {click: 'h', long_click: '「', ascii_long_click: '「', cangjie_label: '竹'}
- {click: 'j', long_click: '」', ascii_long_click: '」', cangjie_label: '十'}
- {click: 'k', long_click: '"', cangjie_label: '大'}
- {click: 'l', long_click: "'", cangjie_label: '中'}
- {width: 5}
- {click: Shift_L, send_bindings: false, width: 15}
- {click: 'z', long_click: '~', ascii_long_click: '~', cangjie_label: '重'}
- {click: 'x', long_click: '/', ascii_long_click: '/', cangjie_label: '難', has_menu_hint: '2/5'}
- {click: 'c', long_click: ':', ascii_long_click: ':', cangjie_label: '金'}
- {click: 'v', long_click: ';', ascii_long_click: ';', cangjie_label: '女', has_menu_hint: '1/4'}
- {click: 'b', long_click: '!', ascii_long_click: '!', cangjie_label: '月'}
- {click: 'n', long_click: '?', ascii_long_click: '?', cangjie_label: '弓'}
- {click: 'm', long_click: '、', ascii_long_click: '、', cangjie_label: '一'}
- {click: BackSpace, width: 15, swipe_left: Escape}
- {click: Keyboard_symbols1, width: 15}
- {click: IME_next, long_click: IME_switch}
- {click: ',', ascii: ','}
- {click: space, width: 40, hint: 'TypeDuck'}
- {click: '。', ascii: '.', has_menu: SeparateSyllable, extra: ['.', '。', 'º', '°', '○', '◌', '◦']}
- {click: Return, composing: Return1, width: 15}
letter:
__include: /preset_keyboards/default
ascii_mode: 1
reset_ascii_mode: true
lock: false
symbols1:
name: Symbols Page 1
width: 10
height: 44
keys:
- {click: '1', long_click: '1', extra: ['壹', '一', '㊀', '㈠', '➊', '⓵', '①', '⑴', '⒈', '¹', '₁']}
- {click: '2', long_click: '2', extra: ['貳', '二', '㊁', '㈡', '➋', '⓶', '②', '⑵', '⒉', '²', '₂']}
- {click: '3', long_click: '3', extra: ['叁', '三', '㊂', '㈢', '➌', '⓷', '③', '⑶', '⒊', '³', '₃']}
- {click: '4', long_click: '4', extra: ['肆', '四', '㊃', '㈣', '➍', '⓸', '④', '⑷', '⒋', '⁴', '₄']}
- {click: '5', long_click: '5', extra: ['伍', '五', '㊄', '㈤', '➎', '⓹', '⑤', '⑸', '⒌', '⁵', '₅']}
- {click: '6', long_click: '6', extra: ['陸', '六', '㊅', '㈥', '➏', '⓺', '⑥', '⑹', '⒍', '⁶', '₆']}
- {click: '7', long_click: '7', extra: ['柒', '七', '㊆', '㈦', '➐', '⓻', '⑦', '⑺', '⒎', '⁷', '₇']}
- {click: '8', long_click: '8', extra: ['捌', '八', '㊇', '㈧', '➑', '⓼', '⑧', '⑻', '⒏', '⁸', '₈']}
- {click: '9', long_click: '9', extra: ['玖', '九', '㊈', '㈨', '➒', '⓽', '⑨', '⑼', '⒐', '⁹', '₉']}
- {click: '0', long_click: '0', extra: ['零', '〇', '⓿', '⓪', '🄀', '⁰', '₀', '拾', '十', '㊉', '㈩', '➓', '⓾', '⑩', '⑽', '⒑']}
- {click: '@', long_click: '@', extra: ['©', '®', '℗', '™', '℠', '∅']}
- {click: '$', long_click: '$', extra: ['¥', '₩', '£', '¢', '₽', '€', '£', '₩', '¥', '¢', '¤']}
- {click: '……', ascii: '…'}
- {click: '——', ascii: '-', extra: ['-', '‒', '―', '–', '—', '⁻', '₋', '˧']}
- {click: '(', ascii: '(', extra: ['⦅', '⸨', '⦅', '⁽', '₍', '͡']}
- {click: ')', ascii: ')', extra: ['⦆', '⸩', '⦆', '⁾', '₎', '͡']}
- {click: '「', ascii: '「', extra: ['『', '˥', '˦']}
- {click: '」', ascii: '」', extra: ['』', '˩', '˨']}
- {click: '"', long_click: '"', extra: ['〝', '〞', '〟', '〃', '″', '‟', '«', '»', '„', '“', '”']}
- {click: "'", long_click: ''', extra: ['′', '‛', '‹', '›', '‘', '’', 'ʼ', 'ˌ', 'ˈ']}
- {click: Keyboard_symbols2, width: 15}
- {click: '~', ascii: '~', extra: ['﹏', '﹋']}
- {click: '/', ascii: '/', extra: ['√', '∕', '÷', 'ˊ', 'ˏ']}
- {click: ':', ascii: ':', extra: ['꞉', 'ː']}
- {click: ';', ascii: ';'}
- {click: '!', ascii: '!', extra: ['¡']}
- {click: '?', ascii: '?', extra: ['¿']}
- {click: '、', ascii: '、'}
- {click: BackSpace, width: 15, swipe_left: Escape}
- {click: Keyboard_default, width: 15}
- {click: IME_next, long_click: IME_switch}
- {click: ',', ascii: ','}
- {click: space, width: 40, hint: 'TypeDuck'}
- {click: '。', ascii: '.', extra: ['.', '。']}
- {click: Return, composing: Return1, width: 15}
symbols2:
name: Symbols Page 2
width: 10
height: 44
keys:
- {click: '`', long_click: '`', extra: ['ˋ', 'ˎ']}
- {click: '\', long_click: '\', extra: ['ˋ', 'ˎ']}
- {click: '|', long_click: '|', extra: ['¦']}
- {click: '#', long_click: '#', extra: ['♯', '♭', '♮']}
- {click: '%', long_click: '%', extra: ['‱', '‰']}
- {click: '^', long_click: '^', extra: ['ˆ', 'ˇ', '↑', '↓']}
- {click: '&', long_click: '&', extra: ['§', '¶']}
- {click: '*', long_click: '*', extra: ['※', '✗', '✓', '×']}
- {click: '+', long_click: '+', extra: ['∓', '±', '⁺', '₊']}
- {click: '=', long_click: '=', extra: ['≡', '≅', '≒', '≠', '≈', '⁼', '₌']}
- {click: '_', long_click: '_', extra: ['‾', ' ̄', 'ˍ', 'ˉ']}
- {click: '[', ascii: '[', extra: ['〚', '【', '〖', '〘', '〔']}
- {click: ']', ascii: ']', extra: ['〛', '】', '〗', '〙', '〕']}
- {click: '{', ascii: '{', extra: ['⦃']}
- {click: '}', ascii: '}', extra: ['⦄']}
- {click: '〈', ascii: '<', extra: ['<', '⫹', '≦', '⩽', '≤', '〈', '‹', '↔', '←']}
- {click: '〉', ascii: '>', extra: ['>', '⫺', '≧', '⩾', '≥', '〉', '›', '↔', '→']}
- {click: '《', ascii: '«', extra: ['⇔', '⇐']}
- {click: '》', ascii: '»', extra: ['⇔', '⇒']}
- {click: '·', ascii: '•', extra: ['‣', '◦', '°', '○', '◌', '◦']}
- {click: Keyboard_symbols1, width: 15}
- {click: '~', ascii: '~', extra: ['﹏', '﹋']}
- {click: '/', ascii: '/', extra: ['√', '∕', '÷', 'ˊ', 'ˏ']}
- {click: ':', ascii: ':', extra: ['꞉', 'ː']}
- {click: ';', ascii: ';'}
- {click: '!', ascii: '!', extra: ['¡']}
- {click: '?', ascii: '?', extra: ['¿']}
- {click: '、', ascii: '、'}
- {click: BackSpace, width: 15, swipe_left: Escape}
- {click: Keyboard_default, width: 15}
- {click: IME_next, long_click: IME_switch}
- {click: ',', ascii: ','}
- {click: space, width: 40, hint: 'TypeDuck'}
- {click: '。', ascii: '.', extra: ['.', '。']}
- {click: Return, composing: Return1, width: 15}
number:
name: Number
width: 20
height: 44
keys:
- {click: '+'}
- {click: 'KP_1'}
- {click: 'KP_2'}
- {click: 'KP_3'}
- {click: BackSpace}
- {click: '-'}
- {click: 'KP_4'}
- {click: 'KP_5'}
- {click: 'KP_6'}
- {click: space, label: '␣'}
- {click: '*'}
- {click: 'KP_7'}
- {click: 'KP_8'}
- {click: 'KP_9'}
- {click: '/'}
- {click: Keyboard_symbols1}
- {click: IME_next, long_click: IME_switch}
- {click: 'KP_0'}
- {click: '.'}
- {click: Return, composing: Return1, width: 15}
stroke:
name: Stroke
width: 20
height: 44
keys:
- {click: '?', ascii: '?', extra: ['¿']}
- {click: h, label: '一', long_click: 'KP_1'}
- {click: s, label: '丨', long_click: 'KP_2'}
- {click: p, label: '丿', long_click: 'KP_3'}
- {click: BackSpace}
- {click: '!', ascii: '!', extra: ['¡']}
- {click: n, label: '丶', long_click: 'KP_4'}
- {click: z, label: '乛', long_click: 'KP_5'}
- {click: x, label: '*', long_click: 'KP_6'}
- {click: Escape1}
- {click: ':', ascii: ':'}
- {click: ';', ascii: ';', long_click: 'KP_7'}
- {click: ',', ascii: ',', long_click: 'KP_8'}
- {click: '。', ascii: '.', long_click: 'KP_9', extra: ['.', '。', 'º', '°']}
- {click: space, label: '␣'}
- {click: Keyboard_symbols1}
- {click: IME_next, long_click: IME_switch}
- {click: 'KP_0'}
- {click: Escape2}
- {click: Return, composing: Return1, width: 15}