From effddbc1eec8e106235c447bd8c483f6abb15f6b Mon Sep 17 00:00:00 2001 From: weijiuqiao <59040746+weijiuqiao@users.noreply.github.com> Date: Fri, 21 Oct 2022 01:37:22 +0800 Subject: [PATCH] zh_keyboard: make number pad symbol mode (#9654) This PR makes zh_keyboard's number pad symbol mode instead of shift mode, so that numbers are shown when the keyboard is called expecting numeral input. --- .../ui/data/keyboardlayouts/zh_keyboard.lua | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/frontend/ui/data/keyboardlayouts/zh_keyboard.lua b/frontend/ui/data/keyboardlayouts/zh_keyboard.lua index 182b75645..5e7fda98f 100644 --- a/frontend/ui/data/keyboardlayouts/zh_keyboard.lua +++ b/frontend/ui/data/keyboardlayouts/zh_keyboard.lua @@ -7,7 +7,7 @@ Supports both simplified and traditional. Characters hardcoded on keys are uniform, no translation needed. In-place candidates can be turned off in keyboard settings. A Separation key 分隔 is used to finish inputting a character. -A Switch key 换字 is used to iterate candidates. +A Switch key 下一字 is used to iterate candidates. Stroke-wise deletion (input not finished) mapped to the default Del key. Character-wise deletion mapped to north of Separation key. @@ -160,42 +160,40 @@ end return { min_layer = 1, - max_layer = 2, - shiftmode_keys = {["123"] = false}, - symbolmode_keys = {["Sym"] = false}, + max_layer = 4, + symbolmode_keys = {["123"] = true}, utf8mode_keys = {["🌐"] = true}, - umlautmode_keys = {["Äéß"] = false}, -- Disabled 'umlaut' keys keys = { -- first row { { label = "123" }, - { JA.s_1, { label = "一", "㇐", north="——"} }, - { JA.s_2, { label = "丨", "㇑"} }, - { s_3, { label = "丿", "㇒"} }, + { "", { label = "一", "㇐", north="——"}, "", JA.s_1 }, + { "", { label = "丨", "㇑"}, "", JA.s_2 }, + { "", { label = "丿", "㇒"}, "", s_3 }, { label = "", bold = false } -- backspace }, -- second row { { label = "←" }, - { JA.s_4, { label = "丶", "㇏", north="、" } }, - { JA.s_5, { label = "𠃋", "㇜" } }, - { JA.s_6, { ime.separator, north=ime.local_del, alt_label=ime.local_del } }, + { "", { label = "丶", "㇏", north="、" }, "", JA.s_4 }, + { "", { label = "𠃋", "㇜" }, "", JA.s_5 }, + { "", { ime.separator, north=ime.local_del, alt_label=ime.local_del }, "", JA.s_6 }, { label = "→" }, }, -- third row { { label = "↑" }, - { JA.s_7, ime.switch_char }, - { s_8, comma_popup }, - { JA.s_9, period_popup }, + { "", ime.switch_char, "", JA.s_7 }, + { "", comma_popup, "", s_8 }, + { "", period_popup, "", JA.s_9 }, { label = "↓" }, }, -- fourth row { { label = "🌐" }, - { label = "空格", " ", " ", width = 2.0 }, - { JA.s_0, { label = "*", W } }, - { label = "⮠", "\n", "\n", bold = true }, -- return + { label = "空格", " ", " ", " ", " ", width = 2.0 }, + { "", { label = "*", W }, "", JA.s_0 }, + { label = "⮠", "\n", "\n", "\n", "\n", bold = true }, -- return }, },