forked from ksqsf/rime-moran
-
Notifications
You must be signed in to change notification settings - Fork 0
/
moran.yaml
111 lines (103 loc) · 5.08 KB
/
moran.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
# 拼寫運算
algebra:
# 任何編碼都會經過演算式的運算轉變爲用戶直接輸入的編碼。
# 優先級順序爲:
# user_force_top
# -> user_sentence_top
# -> generate_code
# -> user_sentence_bottom
# -> user_force_bottom
# 用戶自定義演算式,這部分演算式會注入到所有方案的開頭和結尾,包括字詞模式和英語詞庫
# 用例:手機上的模糊鍵盤映射
user_force_top:
user_force_bottom:
# __append:
# __patch:
# - moran_defs:/keyboard19
# 用戶自定義演算式,這部分演算式會注入到類整句方案的開頭和結尾,不包括字詞模式
# 用例:實現模糊音、將自然碼雙拼映射爲別的雙拼方案等
user_sentence_top:
# __append:
# __patch:
# - moran_defs:/bufen/z_zh
# - moran_defs:/bufen/c_ch
# - moran_defs:/bufen/s_sh
# - moran_defs:/bufen/en_eng
user_sentence_bottom:
# 用於生成用戶輸入碼的核心演算式
generate_code:
__append:
- derive/^(.+);(\w)(\w)$/$1$2$3o/ # 全碼 YYXXo
- abbrev/^(.+);(\w)(\w)$/$1$2$3/ # 降低 YYXX 優先級
- derive/^(.+);(\w)(\w)$/$1$2/ # 構詞可以用 YYX
- derive/^(.+);(\w)(\w)$/$1/ # 構詞可以用 YY
- erase/^(.+);(.+)$/ # 刪除原始編碼以加速檢索
key_bindings:
# 分號用於次選
moran_semicolon_for_2:
__append:
- { when: has_menu, accept: semicolon, send: "2" }
# 使用 tab 在不同音節間跳轉
moran_tab:
__append:
- { when: has_menu, accept: "Tab", send: "Control+Right" }
- { when: composing, accept: "Tab", send: "Control+Right" }
# 一些功能的開關鍵
moran_switches:
__append:
- { when: has_menu, accept: "Control+s", toggle: simplification }
- { when: has_menu, accept: "Control+u", toggle: unicode_comment }
- { when: has_menu, accept: "Control+q", toggle: emoji }
- { when: has_menu, accept: "Control+Shift+0", toggle: std_opencc }
# 使用大寫字母追加輸入到上一個音節末尾
moran_capital_for_last_syllable:
__append:
- { when: has_menu, accept: Shift+A, send_sequence: "{Control+Left}a{Control+Right}" }
- { when: has_menu, accept: Shift+B, send_sequence: "{Control+Left}b{Control+Right}" }
- { when: has_menu, accept: Shift+C, send_sequence: "{Control+Left}c{Control+Right}" }
- { when: has_menu, accept: Shift+D, send_sequence: "{Control+Left}d{Control+Right}" }
- { when: has_menu, accept: Shift+E, send_sequence: "{Control+Left}e{Control+Right}" }
- { when: has_menu, accept: Shift+F, send_sequence: "{Control+Left}f{Control+Right}" }
- { when: has_menu, accept: Shift+G, send_sequence: "{Control+Left}g{Control+Right}" }
- { when: has_menu, accept: Shift+H, send_sequence: "{Control+Left}h{Control+Right}" }
- { when: has_menu, accept: Shift+I, send_sequence: "{Control+Left}i{Control+Right}" }
- { when: has_menu, accept: Shift+J, send_sequence: "{Control+Left}j{Control+Right}" }
- { when: has_menu, accept: Shift+K, send_sequence: "{Control+Left}k{Control+Right}" }
- { when: has_menu, accept: Shift+L, send_sequence: "{Control+Left}l{Control+Right}" }
- { when: has_menu, accept: Shift+M, send_sequence: "{Control+Left}m{Control+Right}" }
- { when: has_menu, accept: Shift+N, send_sequence: "{Control+Left}n{Control+Right}" }
- { when: has_menu, accept: Shift+O, send_sequence: "{Control+Left}o{Control+Right}" }
- { when: has_menu, accept: Shift+P, send_sequence: "{Control+Left}p{Control+Right}" }
- { when: has_menu, accept: Shift+Q, send_sequence: "{Control+Left}q{Control+Right}" }
- { when: has_menu, accept: Shift+R, send_sequence: "{Control+Left}r{Control+Right}" }
- { when: has_menu, accept: Shift+S, send_sequence: "{Control+Left}s{Control+Right}" }
- { when: has_menu, accept: Shift+T, send_sequence: "{Control+Left}t{Control+Right}" }
- { when: has_menu, accept: Shift+U, send_sequence: "{Control+Left}u{Control+Right}" }
- { when: has_menu, accept: Shift+V, send_sequence: "{Control+Left}v{Control+Right}" }
- { when: has_menu, accept: Shift+W, send_sequence: "{Control+Left}w{Control+Right}" }
- { when: has_menu, accept: Shift+X, send_sequence: "{Control+Left}x{Control+Right}" }
- { when: has_menu, accept: Shift+Y, send_sequence: "{Control+Left}y{Control+Right}" }
- { when: has_menu, accept: Shift+Z, send_sequence: "{Control+Left}z{Control+Right}" }
- { when: has_menu, accept: Shift+BackSpace, send_sequence: "{Control+Left}{BackSpace}{Control+Right}" }
octagram:
disable:
__patch:
grammar: {}
enable_for_sentence:
__patch:
grammar:
language: zh-hant-t-essay-bgw
collocation_max_length: 4
collocation_min_length: 2
enable_for_fixed:
__patch:
grammar:
language: zh-hant-t-essay-bgc
collocation_max_length: 6
collocation_min_length: 2
fixed/+:
contextual_suggestions: true
max_homographs: 7
translator/+:
contextual_suggestions: true
max_homographs: 7