Skip to content

Commit

Permalink
v3.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
forFudan committed May 22, 2024
1 parent e2f816c commit 5520921
Show file tree
Hide file tree
Showing 18 changed files with 294,090 additions and 93,201 deletions.
6 changes: 6 additions & 0 deletions beta/schema/lua/yuhao/yuhao_auto_select.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International
20240514, 朱宇浩: 注意到有時第二選項並不是第一選項的頭幾個字,用户可能在
不覺中上屏了其他的字.因此進行一個判斷,只有當第二選項是第一個選項的
頭幾個字的時候纔會選擇上屏.用户可以指定候選區最多顯示的漢字數.
20240517, 朱宇浩: 續上.第一選項有時是第三候選,因此加一個判斷上屏之.
---------------------------------------
]]

Expand Down Expand Up @@ -50,6 +51,7 @@ function this.func(key_event, env)
end
local first_candidate = segment:get_candidate_at(0)
local second_candidate = segment:get_candidate_at(1)
local third_candidate = segment:get_candidate_at(2)
if not first_candidate or not second_candidate then
return kNoop
end
Expand All @@ -60,6 +62,10 @@ function this.func(key_event, env)
env.engine:process_key(KeyEvent('2'))
return kNoop
end
if core.string_starts_with(first_candidate.text, third_candidate.text) then
env.engine:process_key(KeyEvent('3'))
return kNoop
end
return kNoop
end

Expand Down
13 changes: 6 additions & 7 deletions beta/schema/yuhao_pinyin.dict.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

---
name: "yuhao_pinyin"
version: "20230418"
version: "20240516"
sort: by_weight
vocabulary: yuhao.essay
columns:
- text
- code
Expand Down Expand Up @@ -5867,12 +5868,10 @@ columns:
但在 dan zai 3233
佩服 pei fu 3233
彙報 hui bao 3233
榮 ce 3233
榮 rong 3233
汇报 hui bao 3233
牙 ya 3233
舞 wu 3233
荣 ce 3233
荣 rong 3233
轉讓 zhuan rang 3233
转让 zhuan rang 3233
Expand Down Expand Up @@ -30777,6 +30776,7 @@ columns:
不得已 bu de yi 426
不断发展 bu duan fa zhan 426
不斷發展 bu duan fa zhan 426
不斷髮展 bu duan fa zhan 426
也快 ye kuai 426
五星 wu xing 426
代工 dai gong 426
Expand Down Expand Up @@ -31162,6 +31162,7 @@ columns:
出什么 chu shen me 419
出什麼 chu shen me 419
出什麽 chu shen me 419
匯豐 hui feng 419
十屆 shi jie 419
十届 shi jie 419
单元格 dan yuan ge 419
Expand Down Expand Up @@ -35707,6 +35708,7 @@ columns:
熄燈 xi deng 353
猪八戒 zhu ba jie 353
生長發育 sheng zhang fa yu 353
生長髮育 sheng zhang fa yu 353
生长发育 sheng zhang fa yu 353
痉挛 jing luan 353
痙攣 jing luan 353
Expand Down Expand Up @@ -130892,6 +130894,7 @@ columns:
匯川 hui chuan 0
匯川區 hui chuan qu 0
匯改 hui gai 0
匯業 hui ye 0
匯款人 hui kuan ren 0
匯款單 hui kuan dan 0
匯流 hui liu 0
Expand Down Expand Up @@ -159663,7 +159666,6 @@ columns:
廣寧縣 guang ning xian 0
廣州中醫藥大學 guang zhou zhong yi yao da xue 0
廣州恆大 guang zhou heng da 0
廣州恒大 guang zhou heng da 0
廣州的 guang zhou de 0
廣州美術學院 guang zhou mei shu xue yuan 0
廣州話 guang zhou hua 0
Expand Down Expand Up @@ -164077,11 +164079,8 @@ columns:
恒湿 heng shi 0
恒牙 heng ya 0
恒生指数 heng sheng zhi shu 0
恒生指數 heng sheng zhi shu 0
恒生电子 heng sheng dian zi 0
恒生銀行 heng sheng yin hang 0
恒生银行 heng sheng yin hang 0
恒生電子 heng sheng dian zi 0
恒等 heng deng 0
恕不 shu bu 0
恕罪 shu zui 0
Expand Down
30 changes: 26 additions & 4 deletions beta/schema/yuhao_pinyin.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,33 @@ translator:
- xform/([nl])ue/$1üe/
- xform/([jqxy])v/$1u/

# punctuator:
# import_preset: symbols
punctuator:
import_preset: yuhao.symbols
half_shape:
"`": "`"
"#": "#"
"%": "%"
"*": "*"
"\\": ""
"[": ""
"]": ""
"{": ""
"}": ""
"/": "/"
"|": "|"

# key_binder:
# import_preset: default
key_binder:
bindings:
- { when: always, accept: "Control+period", toggle: ascii_punct }
- { when: always, accept: "Control+Shift+period", toggle: ascii_punct }
- { when: always, accept: "Control+Shift+J", toggle: simplification }
- { when: always, accept: "Control+Shift+F", toggle: traditionalization }
- { when: has_menu, accept: semicolon, send: 2 } # 分号次选
- { when: has_menu, accept: apostrophe, send: 3 } # 引号三选
- { when: has_menu, accept: minus, send: Page_Up } # 減號上翻頁
- { when: has_menu, accept: equal, send: Page_Down } # 等號下翻頁
- { when: has_menu, accept: Tab, send: Page_Down } # Tab 下翻頁
- { when: composing, accept: Escape, send: "Shift+BackSpace" } # 逐字删除

recognizer:
# import_preset: default
Expand Down
Loading

0 comments on commit 5520921

Please sign in to comment.