Files
koreader/frontend/ui/data/keyboardlayouts/th_keyboard.lua
NiLuJe da74691515 Chore: Don't cache static data tables (ui/elements, ui/data, kb layouts & co) (#12519)
Using `require` didn't make much sense since most of them are only used in a single place anyway, and it takes care of a few weird interactions in the process (besides not polluting `package.loaded` with useless crap ;)).
2024-09-16 17:11:42 +02:00

107 lines
4.2 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- Start with the english keyboard layout
local th_keyboard = dofile("frontend/ui/data/keyboardlayouts/en_keyboard.lua")
-- Swap the four AZWQ keys (only in the lowercase and
-- uppercase letters layouts) to change it from QWERTY to AZERTY
local keys = th_keyboard.keys
keys[1][7][3] = ""
keys[1][8][3] = ""
keys[1][9][3] = ""
table.insert(keys[1], {
{"", north="", alt_label=""},
{"", north="", alt_label="", south="",},
"", ""
})
keys[2][1][1] = { "", north="", alt_label="" }
keys[2][1][2] = { "", north="", alt_label="" }
keys[2][2][1] = { "", north="", alt_label="" }
keys[2][2][2] = { "", north="", alt_label="" }
keys[2][3][1] = { "", north="", alt_label="" }
keys[2][3][2] = { "", north="", alt_label="" }
keys[2][4][1] = { "", north="", alt_label="" }
keys[2][4][2] = { "", north="", alt_label="" }
keys[2][5][1] = { "", north="", alt_label="" }
keys[2][5][2] = { "", north="", alt_label="" }
keys[2][6][1] = { "", north="", alt_label="" }
keys[2][6][2] = { "", north="", alt_label="" }
keys[2][7][1] = { "", north="", alt_label="" }
keys[2][7][2] = { "", north="", alt_label="" }
keys[2][7][3] = ""
keys[2][8][1] = { "", north="", alt_label="" }
keys[2][8][2] = { "", north="", alt_label="" }
keys[2][8][3] = ""
keys[2][9][1] = { "", north="", alt_label="" }
keys[2][9][2] = { "", north="", alt_label="" }
keys[2][9][3] = ""
keys[2][10][1] = { "", north="", alt_label="" }
keys[2][10][2] = { "", north="", alt_label="" }
table.insert(keys[2],{
{"", north="", alt_label=""},
{"", north="", alt_label=""},
"฿","฿"
})
keys[3][1][1] = { "", north="", alt_label="" }
keys[3][1][2] = { "", north="", alt_label="" }
keys[3][2][1] = { "", north="", alt_label="" }
keys[3][2][2] = { "", north="", alt_label="" }
keys[3][3][1] = { "", north="", alt_label="" }
keys[3][3][2] = { "", north="", alt_label="" }
keys[3][4][1] = { "", north="", alt_label="" }
keys[3][4][2] = { "", north="", alt_label="" }
keys[3][5][1] = { "", north="", alt_label="" }
keys[3][5][2] = { "", north="", alt_label="" }
keys[3][6][1] = { "", north="", alt_label="" }
keys[3][6][2] = { "", north="", alt_label="" }
keys[3][7][1] = { "", north="", alt_label="" }
keys[3][7][2] = { "", north="", alt_label="" }
keys[3][7][3] = ""
keys[3][8][1] = { "", north="", alt_label="" }
keys[3][8][2] = { "", north="", alt_label="" }
keys[3][8][3] = ""
keys[3][9][1] = { "", north="", alt_label="" }
keys[3][9][2] = { "", north="", alt_label="" }
keys[3][9][3] = ""
keys[3][10][1] = { "", north="", alt_label="" }
keys[3][10][2] = { "", north="", alt_label="" }
table.insert(keys[3],{
{"", north="", alt_label=""},
{"", north="", alt_label="", south="", west=""},
"",""
})
keys[4][2][1] = { "", north="", alt_label="" }
keys[4][2][2] = { "", north="", alt_label="" }
keys[4][3][1] = { "", north="", alt_label="" }
keys[4][3][2] = { "", north="", alt_label="" }
keys[4][4][1] = { "", north="", alt_label="" }
keys[4][4][2] = { "", north="", alt_label="" }
keys[4][5][1] = { "", north="", alt_label="" }
keys[4][5][2] = { "", north="", alt_label="" }
keys[4][6][1] = { "", north="", alt_label="" }
keys[4][6][2] = { "", north="", alt_label="" }
keys[4][6][3] = ""
keys[4][7][1] = { "", north="", alt_label="" }
keys[4][7][2] = { "", north="", alt_label="" }
keys[4][8][1] = { "", north="", alt_label="" }
keys[4][8][2] = { "", north="", alt_label="" }
table.insert(keys[4], 9, {
{"", north="", alt_label=""},
{"", north="", alt_label="", south="", west="", east=""},
"",""
})
table.insert(keys[5],7, {
{"", north="", alt_label=""},
{"", north="", alt_label=""},
"/","/"
})
-- Remove the "space" string
keys[5][4].label = ""
return th_keyboard