keyboard: japanese: always put digits as the south gesture for latin (#8443)

This is to match GBoard's layout for the latin keyboard mode.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
Aleksa Sarai authored and GitHub committed 2021-11-14 14:10:25 +01:00
1 parent 26ec5bafe3
commit 7e611ac50c
2 files changed
+17 -16

No files matched your search

@@ -47,19 +47,19 @@ return {
l_1 = { label = "@-_/", alt_label = "1",
"@", west = "-", north = "_", east = "/", south = "1" },
l_2 = { label = "abc", alt_label = "2",
"a", west = "b", north = "c", east = "2" },
"a", west = "b", north = "c", south = "2" },
l_3 = { label = "def", alt_label = "3",
"d", west = "e", north = "f", east = "3" },
"d", west = "e", north = "f", south = "3" },
l_4 = { label = "ghi", alt_label = "4",
"g", west = "h", north = "i", east = "4" },
"g", west = "h", north = "i", south = "4" },
l_5 = { label = "jkl", alt_label = "5",
"j", west = "k", north = "l", east = "5" },
"j", west = "k", north = "l", south = "5" },
l_6 = { label = "mno", alt_label = "6",
"m", west = "n", north = "o", east = "6" },
"m", west = "n", north = "o", south = "6" },
l_7 = { label = "pqrs", alt_label = "7",
"p", west = "q", north = "r", east = "s", south = "7" },
l_8 = { label = "tuv", alt_label = "8",
"t", west = "u", north = "v", east = "8" },
"t", west = "u", north = "v", south = "8" },
l_9 = { label = "wxyz", alt_label = "9",
"w", west = "x", north = "y", east = "z", south = "9" },
l_0 = { label = "'\":;", alt_label = "0",
+11 -10
View File
@@ -151,10 +151,11 @@ class Key(object):
if lua_items:
lua_items.append("\n") # Put the labels on a separate line.
for direction, key in zip(["", "west", "north", "east", "south"], self.popout):
if direction:
lua_items.append(f'{direction} = {escape_luastring(key)}')
else:
lua_items.append(f'{escape_luastring(key)}')
if key != '\0':
if direction:
lua_items.append(f'{direction} = {escape_luastring(key)}')
else:
lua_items.append(f'{escape_luastring(key)}')
lua_item = f'{self.name} = {{ {", ".join(lua_items)} }}'
# Fix newlines to match the indentation and remove the doubled comma.
indent = len(self.name) + 4 * (indent_level + 1)
@@ -200,13 +201,13 @@ KEYPADS = [
# Latin alphabet.
Key("l_1", "@-_/1", label="@-_/", alt_label="1"),
Key("l_2", "abc2", loop="abcABC2", label="abc", alt_label="2"),
Key("l_3", "def3", loop="defDEF3", label="def", alt_label="3"),
Key("l_4", "ghi4", loop="ghiGHI4", label="ghi", alt_label="4"),
Key("l_5", "jkl5", loop="jklJKL5", label="jkl", alt_label="5"),
Key("l_6", "mno6", loop="mnoMNO6", label="mno", alt_label="6"),
Key("l_2", "abc\02", loop="abcABC2", label="abc", alt_label="2"),
Key("l_3", "def\03", loop="defDEF3", label="def", alt_label="3"),
Key("l_4", "ghi\04", loop="ghiGHI4", label="ghi", alt_label="4"),
Key("l_5", "jkl\05", loop="jklJKL5", label="jkl", alt_label="5"),
Key("l_6", "mno\06", loop="mnoMNO6", label="mno", alt_label="6"),
Key("l_7", "pqrs7", loop="pqrsPQRS7", label="pqrs", alt_label="7"),
Key("l_8", "tuv8", loop="tuvTUV8", label="tuv", alt_label="8"),
Key("l_8", "tuv\08", loop="tuvTUV8", label="tuv", alt_label="8"),
Key("l_9", "wxyz9", loop="wxyzWXYZ9", label="wxyz", alt_label="9"),
Key("l_0", "'\":;0", label="'\":;", alt_label="0"),
Key("l_P", ",.?!", label=",.?!"),