Skip to content

Commit 2df7aaa

Browse files
committed
revise array10 key position
1 parent 166a5ae commit 2df7aaa

8 files changed

+651
-651
lines changed

img/array10_keyboard.png

608 Bytes
Loading

rimefiles/lua/p_components/p_array10_conversion.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local convert_format = require("filter_cand/convert_format")
88

99
local function to_num(t)
1010
if t == "" then return "" end
11-
local format1 = "xlit|zxcvsdfwera|0123456789.|"
11+
local format1 = "xlit|zxcvsdfwerb|0123456789.|"
1212
-- local format2 = ""
1313
-- local proj = convert_format(format1,format2)
1414
local proj = convert_format(format1)
@@ -18,7 +18,7 @@ end
1818

1919
local function to_abc(t)
2020
if t == "" then return "" end
21-
local format1 = "xlit|0123456789.|zxcvsdfwera|"
21+
local format1 = "xlit|0123456789.|zxcvsdfwerb|"
2222
-- local format2 = ""
2323
-- local proj = convert_format(format1,format2)
2424
local proj = convert_format(format1)

rimefiles/lua/processor_array10_and_bpmf_mix.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ local function processor(key, env)
5757
local seg_reverse2_lookup = seg:has_tag("reverse2_lookup")
5858
local seg_reverse3_lookup = seg:has_tag("reverse3_lookup")
5959
--------
60-
local shadow_top_b = string.match(c_input, "```[zxcvsdfwera]$")
61-
local shadow_top_e = string.match(c_input, "(```[zxcvsdfwera]+)$")
62-
local shadow_top_abc = string.match(c_input, "```([zxcvsdfwera]+)$")
60+
local shadow_top_b = string.match(c_input, "```[zxcvsdfwerb]$")
61+
local shadow_top_e = string.match(c_input, "(```[zxcvsdfwerb]+)$")
62+
local shadow_top_abc = string.match(c_input, "```([zxcvsdfwerb]+)$")
6363
local shadow_top_num = string.match(c_input, "```([0-9.]+)$")
6464
--------
6565

@@ -80,7 +80,7 @@ local function processor(key, env)
8080

8181
---------------------------------------------------------------------------
8282
--[[
83-
以下針對 seg:has_tag("shadow_top") 時,刪除最後「```[zxcvsdfwera]」之修正
83+
以下針對 seg:has_tag("shadow_top") 時,刪除最後「```[zxcvsdfwerb]」之修正
8484
--]]
8585

8686
elseif key:repr() == "BackSpace" and seg_shadow_top and shadow_top_b and #c_input == caret_pos then
@@ -102,7 +102,7 @@ local function processor(key, env)
102102
以下針對功能:「轉換對映數字」!
103103
--]]
104104

105-
elseif key:repr() == "q" and shadow_top_abc and (seg_shadow_top or seg_reverse3_lookup) then
105+
elseif key:repr() == "g" and shadow_top_abc and (seg_shadow_top or seg_reverse3_lookup) then
106106
local atn = array10_to_num(shadow_top_abc) or ""
107107
local n = #atn
108108
context:pop_input(n)
@@ -117,7 +117,7 @@ local function processor(key, env)
117117
------------------------------
118118
return 1
119119

120-
elseif key:repr() == "q" and shadow_top_num and not seg_abc and not seg_reverse2_lookup and not context:has_menu() then -- and context:is_composing()
120+
elseif key:repr() == "g" and shadow_top_num and not seg_abc and not seg_reverse2_lookup and not context:has_menu() then -- and context:is_composing()
121121
local ata = array10_to_abc(shadow_top_num) or ""
122122
local n = #ata
123123
context:pop_input(n)

rimefiles/lua/processor_array10_mix.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ local function processor(key, env)
8383
-- local page_size = engine.schema.page_size
8484
local o_ascii_mode = context:get_option("ascii_mode")
8585
local o_switch_key_board = context:get_option("switch_key_board")
86-
-- local key_abc = key:repr():match("^([zxcvsdfweratgb])$")
87-
-- local key_abc = key:repr():match("^([zxcvsdfweratgb])$") or key:repr():match("^([nuiojklmyhp])$") or key:repr():match("^(comma)$") or key:repr():match("^(period)$") or key:repr():match("^(semicolon)$") or key:repr():match("^(slash)$")
86+
-- local key_abc = key:repr():match("^([zxcvsdfwerbqat])$")
87+
-- local key_abc = key:repr():match("^([zxcvsdfwerbqat])$") or key:repr():match("^([nuiojklmyhp])$") or key:repr():match("^(comma)$") or key:repr():match("^(period)$") or key:repr():match("^(semicolon)$") or key:repr():match("^(slash)$")
8888
local key_abc = key:repr():match("^([a-z])$") or key:repr():match("^(comma)$") or key:repr():match("^(period)$") or key:repr():match("^(semicolon)$") or key:repr():match("^(slash)$")
8989
local key_select_keys = key:repr():match("^KP_([0-9])$") or key:repr():match("^Control%+([0-9])$")
9090
-- local key_num_array10 = key:repr():match("^KP_([0-9])$") or key:repr():match("^KP_(Decimal)$")
91-
local shadow_top_b = string.match(c_input, "```[zxcvsdfwera]$")
92-
local shadow_top_e = string.match(c_input, "(```[zxcvsdfwera]+)$")
93-
local abc_words = string.match(c_input, "([zxcvsdfwera]+)$")
91+
local shadow_top_b = string.match(c_input, "```[zxcvsdfwerb]$")
92+
local shadow_top_e = string.match(c_input, "(```[zxcvsdfwerb]+)$")
93+
local abc_words = string.match(c_input, "([zxcvsdfwerb]+)$")
9494
local num_words = string.match(c_input, "([0-9.]+)$")
9595
local lookup_end = string.match(c_input, "[']$")
9696
-- local s_prefix = seg:has_tag("reverse2_lookup") and "';" or seg:has_tag("all_bpm") and "';'" or ""
@@ -156,7 +156,7 @@ local function processor(key, env)
156156

157157
---------------------------------------------------------------------------
158158
--[[
159-
以下針對 seg:has_tag("shadow_top") 時,刪除最後「```[zxcvsdfwera]」之修正
159+
以下針對 seg:has_tag("shadow_top") 時,刪除最後「```[zxcvsdfwerb]」之修正
160160
--]]
161161

162162
elseif key:repr() == "BackSpace" and seg:has_tag("shadow_top") and shadow_top_b and #c_input == caret_pos then
@@ -192,7 +192,7 @@ local function processor(key, env)
192192
以下針對功能:「轉換對映數字」!
193193
--]]
194194

195-
elseif key:repr() == "q" and abc_words and (seg:has_tag("shadow_top") or seg:has_tag("abc") or seg:has_tag("reverse3_lookup")) then
195+
elseif key:repr() == "g" and abc_words and (seg:has_tag("shadow_top") or seg:has_tag("abc") or seg:has_tag("reverse3_lookup")) then
196196
local atn = array10_to_num(abc_words) or ""
197197
local n = #atn
198198
context:pop_input(n)
@@ -201,7 +201,7 @@ local function processor(key, env)
201201
-- context:clear()
202202
return 1
203203

204-
elseif key:repr() == "q" and num_words and not seg:has_tag("reverse2_lookup") and not context:has_menu() then -- and context:is_composing()
204+
elseif key:repr() == "g" and num_words and not seg:has_tag("reverse2_lookup") and not context:has_menu() then -- and context:is_composing()
205205
local ata = array10_to_abc(num_words) or ""
206206
local n = #ata
207207
context:pop_input(n)

rimefiles/onion-array10-and-bpmf.schema.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ key_binder:
142142
- {accept: KP_7, send_sequence: "{grave}{grave}{grave}{w}", when: always}
143143
- {accept: KP_8, send_sequence: "{grave}{grave}{grave}{e}", when: always}
144144
- {accept: KP_9, send_sequence: "{grave}{grave}{grave}{r}", when: always}
145-
- {accept: KP_Decimal, send_sequence: "{grave}{grave}{grave}{a}", when: always}
145+
- {accept: KP_Decimal, send_sequence: "{grave}{grave}{grave}{b}", when: always}
146146
### 轉換小鍵盤(有開頭後) ###
147147
- {accept: KP_0, send: z, when: composing}
148148
- {accept: KP_1, send: x, when: composing}
@@ -154,27 +154,27 @@ key_binder:
154154
- {accept: KP_7, send: w, when: composing}
155155
- {accept: KP_8, send: e, when: composing}
156156
- {accept: KP_9, send: r, when: composing}
157-
- {accept: KP_Decimal, send: a, when: composing}
157+
- {accept: KP_Decimal, send: b, when: composing}
158158
## 以下不要設成:{ when: always }
159159
- {accept: KP_Subtract, send: BackSpace, when: has_menu}
160160
- {accept: KP_Divide, send: Page_Up, when: has_menu}
161161
- {accept: KP_Multiply, send: Page_Down, when: composing}
162-
- {accept: KP_Add, send: q , when: composing}
162+
- {accept: KP_Add, send: g , when: composing}
163163
### END ###
164164

165165

166166
##### 段落識別器 #####
167167
recognizer:
168168
patterns/+:
169-
shadow_top: "```[zxcvsdfwera0-9.]* ?$" # [0-9.]使「變換 數/中」不會跳回注音。
170-
# shadow_top: "```[zxcvsdfwera ]*$" # 多一個空格!掛載在注音下用,但會跳回完整碼單字,故不用。
171-
reverse3_lookup: "==[zxcvsdfwera0-9.]* ?$" # [0-9.]使「變換 數/中」不會跳回注音。
169+
shadow_top: "```[zxcvsdfwerb0-9.]* ?$" # [0-9.]使「變換 數/中」不會跳回注音。
170+
# shadow_top: "```[zxcvsdfwerb ]*$" # 多一個空格!掛載在注音下用,但會跳回完整碼單字,故不用。
171+
reverse3_lookup: "==[zxcvsdfwerb0-9.]* ?$" # [0-9.]使「變換 數/中」不會跳回注音。
172172

173173
# recognizer:
174174
# patterns:
175175
# url: "^(https?:|ftp:|mailto:|file:).*$"
176176
# email: "^[a-z][-_.0-9a-z]*@.*$"
177177
# punct: "(?<![=`])``?[-,;/0-9a-z]*$|[[][[]?'?$|[]][]]?'?$|[[][]]$|[[][[][]][]]$|[[]'[]]'$|[[][[]'[]][]]'$|'''?$|===?$|=``?$|=''?$|=''?=''?$|=[][][][]?$|=[][][][]?=[][][][]?$|=[-,./;][-,./;]? ?$|=,,=[.][.] ?$|=[0-9] ?$|=9=0 ?$|==[].,90'[]+ ?$" #|==[].,90'[][].,'[]? ?$
178-
# shadow_top: "```[zxcvsdfwera]*$"
178+
# shadow_top: "```[zxcvsdfwerb]*$"
179179
# reverse2_lookup: "=[a-z]* ?$"
180-
# reverse3_lookup: "==[zxcvsdfwera]* ?$"
180+
# reverse3_lookup: "==[zxcvsdfwerb]* ?$"

0 commit comments

Comments
 (0)