2
0
mirror of https://github.com/koreader/koreader synced 2024-11-18 03:25:46 +00:00
koreader/frontend/ui/data/keyboardlayouts/tr_keyboard.lua

91 lines
2.8 KiB
Lua
Raw Normal View History

-- Start with the english keyboard layout (deep copy, to not alter it)
local tr_keyboard = require("util").tableDeepCopy(require("ui/data/keyboardlayouts/en_keyboard"))
2020-01-27 23:05:16 +00:00
local keys = tr_keyboard.keys
-- Insert 2 additional key at the end of first 3 rows after numeric row.
-- Kurdish and Azerbaijani letters are on SYM layer (3 and 4).
2020-01-27 23:05:16 +00:00
-- Turkish Lira currency
2020-01-27 23:05:16 +00:00
table.insert(keys[1],
{ "", "", "", "", }
2020-01-27 23:05:16 +00:00
)
-- empty key to make extra keys on other rows fit
2020-01-27 23:05:16 +00:00
table.insert(keys[1],
{ "", "", "", "", }
2020-01-27 23:05:16 +00:00
)
-- Add Ğ, G with breve
2020-01-27 23:05:16 +00:00
table.insert(keys[2],
{ { "Ğ", north = "ğ", }, { "ğ", north = "Ğ", }, { "Ź", north = "ź", }, { "ź", north = "Ź", }, }
2020-01-27 23:05:16 +00:00
)
-- Add Ü, U with umlaut
2020-01-27 23:05:16 +00:00
table.insert(keys[2],
{ { "Ü", north = "ü", }, { "ü", north = "Ü", }, { "Ə", north = "ə", }, { "ə", north = "Ə", }, }
)
-- Add Ş, S with cedilla
table.insert(keys[3], 10,
{ { "Ş", north = "ş", }, { "ş", north = "Ş", }, { "", north = "", }, { "", north = "", }, }
)
-- Add İ and i, dotted I and i
table.insert(keys[3], 11,
{ { "İ", north = "i", }, { "i", north = "İ", }, { "", north = "", }, { "", north = "", }, }
2020-01-27 23:05:16 +00:00
)
-- Add Ö, O with umlaut
table.insert(keys[4], 9,
{ { "Ö", north = "ö", }, { "ö", north = "Ö", }, { "Ł", north = "ł", }, { "ł", north = "Ł", }, }
2020-01-27 23:05:16 +00:00
)
-- Add Ç, C with cedilla
table.insert(keys[4], 10,
{ { "Ç", north = "ç", }, { "ç", north = "Ç", }, { "Ř", north = "ř", }, { "ř", north = "Ř", }, }
2020-01-27 23:05:16 +00:00
)
-- change order "ḧ ẍ ," to ", ḧ ẍ"
keys[3][10][3], keys[3][11][3], keys[3][12][3] = keys[3][12][3], keys[3][10][3], keys[3][11][3]
keys[3][10][4], keys[3][11][4], keys[3][12][4] = keys[3][12][4], keys[3][10][4], keys[3][11][4]
2020-01-27 23:05:16 +00:00
-- Add forward slash and .com symbol to 4th row since we have lot of empty space
--and most phones do this.
table.insert(keys[5], 7,
{ ".com", "/", "\"", "\"", }
2020-01-27 23:05:16 +00:00
)
-- Make .com and Unicode buttons larger since we still have space.
--
keys[5][3].width = 1.5
keys[5][7].width = 1.5
2020-01-27 23:05:16 +00:00
-- Change lowercase "i" to dotless "ı"
keys[2][8][2] = {
"ı", -- dotless i (Turkish)
north = "I", -- dotless I (Turkish)
northeast = "í",
northwest = "ì",
east = "î",
west = "ĩ",
south = "į",
southeast = "ï",
southwest = "ɪ",
"ī",
"ι", -- Greek iota
"i", -- latin i
}
2020-01-27 23:05:16 +00:00
keys[2][8][1] = {
"I", -- dotless I
north = "ı", -- dotless i (Turkish)
northeast = "Í",
northwest = "Ì",
east = "Î",
west = "Ĩ",
south = "Į",
southeast = "Ï",
southwest = "ɪ",
"Ī",
"Ι", -- Greek iota
"I",
}
2020-01-27 23:05:16 +00:00
-- Translate the "space" string
keys[5][4].label = "boşluk"
2020-01-27 23:05:16 +00:00
return tr_keyboard