-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbase.yaml
93 lines (89 loc) · 4.23 KB
/
base.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
patch:
emoji_suggestion:
opencc_config: emoji.json
option_name: emoji_suggestion
tips: none
inherit_comment: false
#############################################################################
# default prediction is in Traditional Chinese, add switch option to convert
# to Simplified Chinese
predict_simp:
opencc_config: t2s.json
option_name: predict_simp_switch
switches/+:
- name: prediction
states: [联想关闭, 联想打开]
reset: 0
- name: predict_simp_switch
reset: 0
states: [ "繁体联想", "简体联想" ]
- name: emoji_suggestion
reset: 0
states: [ "🈚︎", "🈶️" ]
- options: [ gbk, gb2312, cjk, utf8 ]
states: [ GBK汉字, GB2312汉字, CJK字符, UTF8字符 ]
reset: 3
'engine/processors/@before 0': predictor
# for Caps_Lock selecting, move key_binder before ascii_composer
'engine/processors/@before 1': key_binder
# for disabling soft_cursor
#engine/processors/+:
# - lua_processor@*basefunctions*Disable_Soft_Cursor
#engine/processors/+:
#- lua_processor@*keymap
'engine/translators/@before 0': predict_translator
predictor/db: predict.db
predictor/max_candidates: 6
predictor/max_iterations: 1
#############################################################################
menu/page_size: 6
engine/filters/+:
- simplifier@predict_simp
- lua_filter@*charcode-lua
- lua_filter@*basefunctions*Multiline_filter
- lua_filter@*basefunctions*Tip_Filter
- simplifier@emoji_suggestion
engine/translators/+:
- lua_translator@*number
- lua_translator@*number*calc
- lua_translator@*number*hex
- lua_translator@*number*dec
- lua_translator@*mydate
- lua_translator@*unicode
- lua_translator@*wubi091_zg
- lua_translator@*emoji
- lua_translator@*basefunctions*Lua_Tips
- lua_translator@*clipboard
punctuator/import_preset: symbols
recognizer/patterns/punct: '^/(([a-zA-Z]+)|\?|N\d|N10)$'
recognizer/patterns/hex: '^H[0-9]+$'
recognizer/patterns/dec: '^D[0-9a-fA-F]+$'
recognizer/patterns/calc: '^C=.*$'
recognizer/patterns/unicode1: '^/un[0-9a-fA-F]{0,6}$'
recognizer/patterns/unicode2: '^/uc[0-9a-fA-F]{0,6}([^0-9a-fA-F]+[0-9a-fA-F]{0,6})*$'
recognizer/patterns/unicode3: '^/ur[0-9a-fA-F]{0,6}(-[0-9a-fA-F]{0,6})?$'
recognizer/patterns/date1: '^/\d{1,8}([hq]\d+)?\D?$'
recognizer/patterns/date2: '^/\d{1,8}(g|n|nr)$'
recognizer/patterns/date3: '^/\d{1,6}[hq]$'
recognizer/patterns/week: '^/[1-7][sxz]$'
recognizer/patterns/money: '^/dx\d+(\.\d{0,2})?$'
key_binder/bindings/+:
- { accept: semicolon, send: 2, when: has_menu} #打字时,; 选中第2个候选字发送
- { accept: apostrophe, send: 3, when: has_menu} #打字时,' 选中第3个候选字发送
- { accept: Shift+Shift_R, send: 3, when: has_menu } #打字时,选中第三个候选字发送
- { accept: slash, send: 4, when: has_menu} #打字时,/ 选中第4个候选字发送
# Caps_Lock selecting 4
- { accept: Caps_Lock, send: 4, when: has_menu} #打字时,Caps_Lock 选中第4个候选字发送
- { accept: Release+Caps_Lock, send: Release+4, when: has_menu} #打字时,Caps_Lock 选中第4个候选字发送
# other group binding of 456
- { accept: Control+j, send: 4, when: has_menu} #打字时,Ctrl+j选中第4个候选字发送
- { accept: Control+k, send: 5, when: has_menu} #打字时,Ctrl+k选中第5个候选字发送
- { accept: Control+l, send: 6, when: has_menu} #打字时,Ctrl+l选中第6个候选字发送
# for my keybord binding, combo df get (, combo jk get )
- { accept: Shift+parenleft, send: 5, when: has_menu} #打字时,左括号选中第5个候选字发送
- { accept: Shift+parenright, send: 6, when: has_menu} #打字时,右括号选中第6个候选字发送
- { accept: Tab, send: Down, when: has_menu} #打字时,Tab和Shift+Tab切换候选
- { accept: Shift+Tab, send: Up, when: has_menu} #打字时,Tab和Shift+Tab切换候选
- { accept: minus, send: Page_Up, when: paging} #减号向前翻页
- { accept: equal, send: Page_Down, when: has_menu} #等于号向后翻页
- { accept: Control+9, toggle: prediction, when: always}