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>
pull/8446/head
Aleksa Sarai 2 years ago committed by GitHub
parent 26ec5bafe3
commit 7e611ac50c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -47,19 +47,19 @@ return {
l_1 = { label = "@-_/", alt_label = "",
"@", west = "-", north = "_", east = "/", south = "" },
l_2 = { label = "abc", alt_label = "",
"a", west = "b", north = "c", east = "" },
"a", west = "b", north = "c", south = "" },
l_3 = { label = "def", alt_label = "",
"d", west = "e", north = "f", east = "" },
"d", west = "e", north = "f", south = "" },
l_4 = { label = "ghi", alt_label = "",
"g", west = "h", north = "i", east = "" },
"g", west = "h", north = "i", south = "" },
l_5 = { label = "jkl", alt_label = "",
"j", west = "k", north = "l", east = "" },
"j", west = "k", north = "l", south = "" },
l_6 = { label = "mno", alt_label = "",
"m", west = "n", north = "o", east = "" },
"m", west = "n", north = "o", south = "" },
l_7 = { label = "pqrs", alt_label = "",
"p", west = "q", north = "r", east = "s", south = "" },
l_8 = { label = "tuv", alt_label = "",
"t", west = "u", north = "v", east = "" },
"t", west = "u", north = "v", south = "" },
l_9 = { label = "wxyz", alt_label = "",
"w", west = "x", north = "y", east = "z", south = "" },
l_0 = { label = "'\":;", alt_label = "",

@ -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", "@-_/", label="@-_/", alt_label=""),
Key("l_2", "abc", loop="abcABC", label="abc", alt_label=""),
Key("l_3", "def", loop="defDEF", label="def", alt_label=""),
Key("l_4", "ghi", loop="ghiGHI", label="ghi", alt_label=""),
Key("l_5", "jkl", loop="jklJKL", label="jkl", alt_label=""),
Key("l_6", "mno", loop="mnoMNO", label="mno", alt_label=""),
Key("l_2", "abc\0", loop="abcABC", label="abc", alt_label=""),
Key("l_3", "def\0", loop="defDEF", label="def", alt_label=""),
Key("l_4", "ghi\0", loop="ghiGHI", label="ghi", alt_label=""),
Key("l_5", "jkl\0", loop="jklJKL", label="jkl", alt_label=""),
Key("l_6", "mno\0", loop="mnoMNO", label="mno", alt_label=""),
Key("l_7", "pqrs", loop="pqrsPQRS", label="pqrs", alt_label=""),
Key("l_8", "tuv", loop="tuvTUV", label="tuv", alt_label=""),
Key("l_8", "tuv\0", loop="tuvTUV", label="tuv", alt_label=""),
Key("l_9", "wxyz", loop="wxyzWXYZ", label="wxyz", alt_label=""),
Key("l_0", "'\":;", label="'\":;", alt_label=""),
Key("l_P", ",.?!", label=",.?!"),

Loading…
Cancel
Save