VirtualKeyboard: redesign and enhancements (#8089)

See #8089 for all the details.
reviewable/pr8131/r1
mergen3107 3 years ago committed by GitHub
parent 684fd6c12d
commit fdae07e2cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,7 +3,7 @@ local de_keyboard = require("util").tableDeepCopy(require("ui/data/keyboardlayou
local keys = de_keyboard.keys
keys[1][6][1], keys[3][2][1] = keys[3][2][1], keys[1][6][1] -- Z <-> Y
keys[1][6][2], keys[3][2][2] = keys[3][2][2], keys[1][6][2] -- z <-> y
keys[2][6][1], keys[4][2][1] = keys[4][2][1], keys[2][6][1] -- Z <-> Y
keys[2][6][2], keys[4][2][2] = keys[4][2][2], keys[2][6][2] -- z <-> y
return de_keyboard

@ -1,8 +1,10 @@
local en_popup = require("ui/data/keyboardlayouts/keypopup/en_popup")
local com = en_popup.com -- comma (,)
local prd = en_popup.prd -- period (.)
local _at = en_popup._at
local _eq = en_popup._eq -- equals sign (=)
local pco = en_popup.pco
local cop = en_popup.cop
local cse = en_popup.cse
local sec = en_popup.sec
local quo = en_popup.quo
-- English letters
local _A_ = en_popup._A_
local _a_ = en_popup._a_
local _B_ = en_popup._B_
@ -55,73 +57,142 @@ local _Y_ = en_popup._Y_
local _y_ = en_popup._y_
local _Z_ = en_popup._Z_
local _z_ = en_popup._z_
-- other
local _1_ = en_popup._1_ -- numeric key 1
local _1p = en_popup._1p -- numeric key 1, popup sibling (they have north swipe ups of each other, the rest is the same)
local _1n = en_popup._1n -- numpad key 1
local _1s = en_popup._1s -- superscript key 1
local _2_ = en_popup._2_
local _2p = en_popup._2p
local _2n = en_popup._2n
local _2s = en_popup._2s
local _3_ = en_popup._3_
local _3p = en_popup._3p
local _3n = en_popup._3n
local _3s = en_popup._3s
local _4_ = en_popup._4_
local _4p = en_popup._4p
local _4n = en_popup._4n
local _4s = en_popup._4s
local _5_ = en_popup._5_
local _5p = en_popup._5p
local _5n = en_popup._5n
local _5s = en_popup._5s
local _6_ = en_popup._6_
local _6p = en_popup._6p
local _6n = en_popup._6n
local _6s = en_popup._6s
local _7_ = en_popup._7_
local _7p = en_popup._7p
local _7n = en_popup._7n
local _7s = en_popup._7s
local _8_ = en_popup._8_
local _8p = en_popup._8p
local _8n = en_popup._8n
local _8s = en_popup._8s
local _9_ = en_popup._9_
local _9p = en_popup._9p
local _9n = en_popup._9n
local _9s = en_popup._9s
local _0_ = en_popup._0_
local _0p = en_popup._0p
local _0n = en_popup._0n
local _0s = en_popup._0s
local sla = en_popup.sla
local sl2 = en_popup.sl2
local eql = en_popup.eql
local eq2 = en_popup.eq2
local pls = en_popup.pls
local pl2 = en_popup.pl2
local mns = en_popup.mns
local mn2 = en_popup.mn2
local dsh = en_popup.dsh
local dgr = en_popup.dgr
local tpg = en_popup.tpg
local mth = en_popup.mth
local mt2 = en_popup.mt2
local int = en_popup.int
local dif = en_popup.dif
local df2 = en_popup.df2
local ls1 = en_popup.ls1
local ls2 = en_popup.ls2
local mr1 = en_popup.mr1
local mr2 = en_popup.mr2
local pdc = en_popup.pdc
local pd2 = en_popup.pd2
local bar = en_popup.bar
local prm = en_popup.prm
local hsh = en_popup.hsh
local hs2 = en_popup.hs2
return {
min_layer = 1,
max_layer = 8,
shiftmode_keys = {[""] = true, ["1/2"] = true, ["2/2"] = true,},
symbolmode_keys = {["Sym"] = true, ["ABC"] = true},
utf8mode_keys = {["🌐"] = true},
umlautmode_keys = {["Äéß"] = true},
max_layer = 4,
shiftmode_keys = { [""] = true },
symbolmode_keys = { [""] = true },
utf8mode_keys = { ["🌐"] = true },
-- Width of any key can be modified by adding "width = 1.0, " in the list.
keys = {
-- first row
{ -- 1 2 3 4 5 6 7 8
{ _Q_, _q_, "", "0", "Å", "å", "1", "ª", },
{ _W_, _w_, "!", "1", "Ä", "ä", "2", "º", },
{ _E_, _e_, _at, "2", "Ö", "ö", "3", "¡", },
{ _R_, _r_, "#", "3", "", "ß", "4", "¿", },
{ _T_, _t_, "+", _eq, "À", "à", "5", "¼", },
{ _Y_, _y_, "", "(", "Â", "â", "6", "½", },
{ _U_, _u_, "", ")", "Æ", "æ", "7", "¾", },
{ _I_, _i_, "|", "\\", "Ü", "ü", "8", "©", },
{ _O_, _o_, "?", "/", "È", "è", "9", "®", },
{ _P_, _p_, "~", "`", "É", "é", "0", "", },
-- First row
{ -- R r S s
{ _1p, _1_, "`", "!", },
{ _2p, _2_, "", "¡", },
{ _3p, _3_, "", dsh, },
{ _4p, _4_, "", "_", },
{ _5p, _5_, "", quo, },
{ _6p, _6_, eq2, eql, },
{ _7p, _7_, _7s, _7n, },
{ _8p, _8_, _8s, _8n, },
{ _9p, _9_, _9s, _9n, },
{ _0p, _0_, mn2, mns, },
},
-- second row
{ -- 1 2 3 4 5 6 7 8
{ _A_, _a_, "", _at, "Ê", "ê", "Ş", "ş", },
{ _S_, _s_, "$", "4", "Ë", "ë", "İ", "ı", },
{ _D_, _d_, "%", "5", "Î", "î", "Ğ", "ğ", },
{ _F_, _f_, "^", "6", "Ï", "ï", "Ć", "ć", },
{ _G_, _g_, ":", ";", "Ô", "ô", "Č", "č", },
{ _H_, _h_, '"', "'", "Œ", "œ", "Đ", "đ", },
{ _J_, _j_, "{", "[", "Ù", "ù", "Š", "š", },
{ _K_, _k_, "}", "]", "Û", "û", "Ž", "ž", },
{ _L_, _l_, "_", "-", "Ÿ", "ÿ", "Ő", "ő", },
-- Second row
{ -- R r S s
{ _Q_, _q_, dif, "?", },
{ _W_, _w_, int, "¿", },
{ _E_, _e_, mth, "~", },
{ _R_, _r_, mt2, "\\", },
{ _T_, _t_, df2, bar, },
{ _Y_, _y_, sl2, sla, },
{ _U_, _u_, _4s, _4n, },
{ _I_, _i_, _5s, _5n, },
{ _O_, _o_, _6s, _6n, },
{ _P_, _p_, pl2, pls, },
},
-- third row
{ -- 1 2 3 4 5 6 7 8
{ "", "", "2/2", "1/2", "", "", "", "",
width = 1.5
},
{ _Z_, _z_, "&", "7", "Á", "á", "Ű", "ű", },
{ _X_, _x_, "*", "8", "Ø", "ø", "Ã", "ã", },
{ _C_, _c_, "£", "9", "Í", "í", "Þ", "þ", },
{ _V_, _v_, "<", com, "Ñ", "ñ", "Ý", "ý", },
{ _B_, _b_, ">", prd, "Ó", "ó", "", "", },
{ _N_, _n_, "", "", "Ú", "ú", "", "", },
{ _M_, _m_, "", "", "Ç", "ç", "", "¨", },
{ label = "",
width = 1.5,
bold = false
},
-- Third row
{ -- R r S s
{ _A_, _a_, ls2, ls1, },
{ _S_, _s_, mr2, mr1, },
{ _D_, _d_, dgr, "(", },
{ _F_, _f_, tpg, ")", },
{ _G_, _g_, hs2, hsh, },
{ _H_, _h_, pd2, pdc, },
{ _J_, _j_, _1s, _1n, },
{ _K_, _k_, _2s, _2n, },
{ _L_, _l_, _3s, _3n, },
{ sec, cse, sec, cse, }, -- comma/semicolon with CSS popup block
},
-- fourth row
{
{ "Sym", "Sym", "ABC", "ABC", "Sym", "Sym", "ABC", "ABC",
width = 1.5},
{ label = "🌐", },
{ "Äéß", "Äéß", "Äéß", "Äéß", "Äéß", "Äéß", "Äéß", "Äéß", },
{ label = "space",
" ", " ", " ", " ", " ", " ", " ", " ",
width = 3.0},
{ com, com, "", "", "Ũ", "ũ", com, com, },
{ prd, prd, "", "", "Ĩ", "ĩ", prd, prd, },
{ label = "",
"\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n",
width = 1.5,
bold = true
},
-- Fourth row
{ -- R r S s
{ label = "", width = 1.5, }, -- Shift
{ _Z_, _z_, prm, "{", },
{ _X_, _x_, "°", "}", },
{ _C_, _c_, "«", "[", },
{ _V_, _v_, "»", "]", },
{ _B_, _b_, _0s, _0n, },
{ _N_, _n_, "", "", },
{ _M_, _m_, "", "", },
{ label = "", width = 1.5, }, -- Backspace
},
-- Fifth row
{ -- R r S s
{ label = "", width = 1.5, bold = true, alt_label = "SYM"}, -- SYM key
{ label = "🌐", }, -- Globe key
{ cop, pco, cop, pco, }, -- period/colon with RegEx popup block
{ label = "_", " ", " ", " ", " ", width = 3.0, }, -- Spacebar
{ label = "", }, -- Arrow left
{ label = "", }, -- Arrow right
{ label = "", "\n","\n","\n","\n", width = 1.5, }, -- Enter
},
},
}

@ -4,12 +4,25 @@ local es_keyboard = require("util").tableDeepCopy(require("ui/data/keyboardlayou
local keys = es_keyboard.keys
-- Insert an additional key at the end of 2nd row for easy Ñ and ñ
table.insert(keys[2],
-- 1 2 3 4 5 6 7 8
{ "Ñ", "ñ", "Ñ", "ñ", "Ñ", "ñ", "Ñ", "ñ", }
table.insert(keys[4], 7,
{ { "Ñ", north = "ñ", }, { "ñ", north = "Ñ", }, { "¿", alt_label = "¡", }, { "¡", alt_label = "¿", }, }
)
-- put zero in its usual space under numpad (layers 3 and 4)
keys[4][6][3], keys[4][7][3] = keys[4][7][3], keys[4][6][3]
keys[4][6][4], keys[4][7][4] = keys[4][7][4], keys[4][6][4]
-- swap "ñ" and ","
keys[4][7][1], keys[3][10][1] = keys[3][10][1], keys[4][7][1]
keys[4][7][2], keys[3][10][2] = keys[3][10][2], keys[4][7][2]
-- change order ", n m" to "n m ,"
keys[4][7][1], keys[4][8][1], keys[4][9][1] = keys[4][8][1], keys[4][9][1], keys[4][7][1]
keys[4][7][2], keys[4][8][2], keys[4][9][2] = keys[4][8][2], keys[4][9][2], keys[4][7][2]
-- Rename "space"
keys[4][4].label = "espacio"
keys[5][4].label = "espacio"
keys[4][1].width = 1.0 -- resize Shift
keys[4][10].width = 1.0 -- resize Enter
return es_keyboard

@ -4,62 +4,27 @@ local fr_keyboard = require("util").tableDeepCopy(require("ui/data/keyboardlayou
-- Swap the four AZWQ keys (only in the lowercase and
-- uppercase letters layouts) to change it from QWERTY to AZERTY
local keys = fr_keyboard.keys
keys[1][1][1], keys[2][1][1] = keys[2][1][1], keys[1][1][1] -- Q <> A
keys[1][1][2], keys[2][1][2] = keys[2][1][2], keys[1][1][2] -- q <> a
keys[1][2][1], keys[3][2][1] = keys[3][2][1], keys[1][2][1] -- W <> Z
keys[1][2][2], keys[3][2][2] = keys[3][2][2], keys[1][2][2] -- w <> z
keys[2][1][1], keys[3][1][1] = keys[3][1][1], keys[2][1][1] -- Q <> A
keys[2][1][2], keys[3][1][2] = keys[3][1][2], keys[2][1][2] -- q <> a
keys[2][2][1], keys[4][2][1] = keys[4][2][1], keys[2][2][1] -- W <> Z
keys[2][2][2], keys[4][2][2] = keys[4][2][2], keys[2][2][2] -- w <> z
-- And as A/a is now near the left border, re-order the popup keys so that we can get
-- the à (very common in french) with a swipe south-east instead of hard north-west
keys[2][1][1].southeast, keys[2][1][1].northwest = keys[2][1][1].northwest, keys[2][1][1].southeast
keys[2][1][2].southeast, keys[2][1][2].northwest = keys[2][1][2].northwest, keys[2][1][2].southeast
-- Insert an additional key at the end of 2nd row for M
table.insert(keys[2],
-- 1 2 3 4 5 6 7 8
{ "M", "m", "§", "+", "Œ", "œ", "Ő", "ő", }
)
-- But replace the alpha "M" and "m" with the original key+popup from english M/m
keys[2][10][1] = keys[3][8][1]
keys[2][10][2] = keys[3][8][2]
-- We have one more key than en_keyboard: replace that original M key
-- to show another char on alpha layouts: let's use ";", and a popup
-- helpful for CSS style tweaks editing.
local _semicolon = {
";",
-- north = "!",
north = { label = "!…", key = "!important;" },
northeast = "}",
northwest = "{",
west = "-",
east = ":",
south = "*",
southwest = "0",
southeast = ">",
"[",
'+',
"]",
}
keys[3][8][1] = _semicolon
keys[3][8][2] = _semicolon
-- Swap ê and ë (and the like) in the keyboard popups, so the
-- common french accentuated chars are all on the upper row.
local popups = {
keys[1][1][1], -- A
keys[1][1][2], -- a
keys[1][3][1], -- E
keys[1][3][2], -- e
keys[1][7][1], -- U
keys[1][7][2], -- u
keys[1][8][1], -- I
keys[1][8][2], -- i
keys[1][9][1], -- O
keys[1][9][2], -- o
}
for _, popup in ipairs(popups) do
popup.north, popup.east = popup.east, popup.north
end
-- Swap the M and ',' keys
keys[3][10][1], keys[4][8][1] = keys[4][8][1], keys[3][10][1] -- M <> ;
keys[3][10][2], keys[4][8][2] = keys[4][8][2], keys[3][10][2] -- m <> ,
-- And as M/m is now near the right border, swap its popup east swipes to be west swipes
keys[3][10][1].northwest, keys[3][10][1].northeast = keys[3][10][1].northeast, nil
keys[3][10][2].northwest, keys[3][10][2].northeast = keys[3][10][2].northeast, nil
keys[3][10][1].west, keys[3][10][1].east = keys[3][10][1].east, nil
keys[3][10][2].west, keys[3][10][2].east = keys[3][10][2].east, nil
-- Remove the "space" string
keys[4][4].label = ""
keys[5][4].label = ""
-- Or, if we'd rather have it in french:
-- keys[4][4].label = "espace"
-- keys[5][4].label = "espace"
return fr_keyboard
return fr_keyboard

@ -1,5 +1,9 @@
local en_popup = require("ui/data/keyboardlayouts/keypopup/en_popup")
local he_popup = require("ui/data/keyboardlayouts/keypopup/he_popup")
local pco = en_popup.pco
local cop = en_popup.cop
local cse = en_popup.cse
local sec = en_popup.sec
local com = en_popup.com -- comma (,)
local prd = en_popup.prd -- period (.)
local _at = en_popup._at
@ -32,7 +36,7 @@ return {
min_layer = 1,
max_layer = 4,
shiftmode_keys = {[""] = true},
symbolmode_keys = {["Sym"] = true, ["אבג"] = true},
symbolmode_keys = { [""] = true },
utf8mode_keys = {["🌐"] = true},
keys = {
-- first row
@ -59,6 +63,7 @@ return {
{ "ֶ ", "ח", "{", "[", },
{ "ַ ", lamed, "}", "]", },
{ "ָ ", "ך", "_", "-", },
{ sec, cse, sec, cse, }, -- comma/semicolon with CSS popup block
},
-- third row
{ -- 1 2 3 4
@ -79,11 +84,11 @@ return {
},
-- fourth row
{
{ "Sym", "Sym", "אבג", "אבג",
width = 1.5},
{ label = "", width = 1.5, bold = true, alt_label = "SYM"}, -- SYM key
{ label = "🌐", },
{ cop, pco, cop, pco, }, -- period/colon with RegEx popup block
{ " ", " ", " ", " ",
width = 3.0},
width = 3.0, label = "_"},
{ com, taf, "", "", },
{ prd, "ץ", "", "", },
{ label = "",

@ -2,501 +2,619 @@ return {
com = {
",",
north = ";",
alt_label = ";",
northeast = "(",
northwest = "\\",
east = "?",
west = "¿",
"{",
"}",
"[",
northwest = "¿",
east = "",
west = "?",
},
prd = {
".",
north = ":",
alt_label = ":",
northeast = ")",
northwest = "/",
northwest = "¡",
east = "",
west = "!",
"]",
"-",
"_",
},
_at = {
"@",
north = "",
alt_label = "",
northeast = "",
northwest = "",
},
_eq = {
"=",
north = "",
north = "_",
alt_label = "_",
northwest = "-",
west = "",
south = "",
southwest = "",
},
pco = { -- period + colon
".",
north = ":",
alt_label = ":",
northeast = "'",
northwest = "=",
east = "!",
west = "?",
south = "|",
southeast = "\\",
southwest = "/",
'^',
"&",
"$",
},
cop = { -- colon + period
":",
north = ".",
alt_label = ".",
northeast = "'",
northwest = "=",
east = "!",
west = "?",
south = "|",
southeast = "\\",
southwest = "/",
'^',
"&",
"$",
},
quo = {
'"',
north = "'",
alt_label = "'",
northeast = "»",
northwest = "«",
east = ">",
west = "<",
south = "",
southeast = "",
southwest = "",
east = "",
west = "",
south = "`",
southeast = "",
southwest = "",
"",
"",
},
cse = { -- comma + semicolon
",",
north = ";",
alt_label = ";",
northeast = "}",
northwest = "{",
east = { label = "!…", key = "!important;" },
west = "-",
south = "*",
southwest = "0",
southeast = ">",
"[",
"+",
"]",
},
sec = { -- semicolon + comma
";",
north = ",",
alt_label = ",",
northeast = "}",
northwest = "{",
east = { label = "!…", key = "!important;" },
west = "-",
south = "*",
southwest = "0",
southeast = ">",
"[",
"*",
"]",
},
_A_ = {
"A",
north = "Ä",
north = "a",
northeast = "Á",
northwest = "À",
east = "Â",
west = "Ã",
south = "Ą",
southeast = "Æ",
southeast = "Ä",
southwest = "Å",
"Ā",
"Ǎ",
"Æ",
},
_a_ = {
"a",
north = "ä",
north = "A",
northeast = "á",
northwest = "à",
east = "â",
west = "ã",
south = "ą",
southeast = "æ",
southeast = "ä",
southwest = "å",
"ā",
"ǎ",
"æ",
},
_B_ = {
"B",
north = "Β",
northeast = "β",
northwest = "",
north = "b",
east = "Β", -- Greek beta
west = "",
},
_b_ = {
"b",
north = "Β",
northeast = "β",
northwest = "",
north = "B",
east = "β", -- Greek beta
west = "",
},
_C_ = {
"C",
north = "Ċ",
north = "c",
northeast = "Ć",
northwest = "🄯", -- copyleft symbol
east = "Ĉ",
west = "Č",
south = "Ç",
southeast = "©", -- copyright symbol
southwest = "¢", -- cent sign
southwest = "Ċ", -- cent sign
"¢",
},
_c_ = {
"c",
north = "ċ",
north = "C",
northeast = "ć",
northwest = "🄯", -- copyleft symbol
east = "ĉ",
west = "č",
south = "ç",
southeast = "©", -- copyright symbol
southwest = "¢", -- cent sign
southwest = "ċ", -- cent sign
"¢",
},
_D_ = {
"D",
north = "Đ",
north = "d",
northeast = "Ð",
northwest = "Ď",
east = "Δ",
east = "$", -- Dollar currency
west = "Đ",
south = "", -- partial derivative
southeast = "Δ", -- Greek delta
},
_d_ = {
"d",
north = "đ",
north = "D",
northeast = "ð",
northwest = "ď",
east = "δ",
east = "$", -- Dollar currency
west = "đ",
south = "", -- partial derivative
southeast = "δ", -- Greek delta
},
_E_ = {
"E",
north = "Ë",
north = "e",
northeast = "É",
northwest = "È",
east = "Ê",
west = "",
south = "Ę",
southeast = "",
southeast = "Ë",
southwest = "Ė",
"Ē",
"Ě",
"ɛ",
"", -- Euro currency
},
_e_ = {
"e",
north = "ë",
north = "E",
northeast = "é",
northwest = "è",
east = "ê",
west = "",
south = "ę",
southeast = "",
southeast = "ë",
southwest = "ė",
"ē",
"ě",
"ɛ",
"", -- Euro currency
},
_F_ = {
"F",
north = "f",
east = "ƒ", -- Guilder/Florin
west = "Φ", -- uppercase phi
},
_f_ = {
"f",
north = "F",
east = "ƒ", -- Guilder/Florin
west = "φ", -- lowercase phi
},
_G_ = {
"G",
north = "g",
northeast = "Γ", -- Greek gamma
east = "ɣ", -- voiced velar fricative IPA
west = "Γ", -- uppercase gamma
},
_g_ = {
"g",
north = "G",
northeast = "γ", -- Greek gamma
east = "ɣ", -- voiced velar fricative IPA
west = "γ", -- lowercase gamma
},
_H_ = {
"H",
north = "h",
east = "ɥ", -- labialized palatal approximant (like a combination between /w/ and /y/)
west = "Η", -- uppercase eta
},
_h_ = {
"h",
north = "H",
east = "ɥ", -- labialized palatal approximant (like a combination between /w/ and /y/)
west = "η", -- lowercase eta
},
_I_ = {
"I",
north = "Ï",
north = "i",
northeast = "Í",
northwest = "Ì",
east = "Î",
west = "Ĩ",
south = "Į",
southeast = "Ï",
southwest = "ɪ",
"Ī",
"ɪ", -- small capital letter i, near-close front unrounded vowel IPA
"Ι", -- Greek iota
"I", -- dotless I (Turkish)
},
_i_ = {
"i",
north = "ï",
north = "I",
northeast = "í",
northwest = "ì",
east = "î",
west = "ĩ",
south = "į",
southeast = "ï",
southwest = "ɪ",
"ī",
"ɪ", -- small capital letter i, near-close front unrounded vowel IPA
"ι", -- Greek iota
"ı", -- dotless i (Turkish)
},
_J_ = {
"J",
north = "j",
east = "ʝ", -- voiced palatal fricative
},
_j_ = {
"j",
north = "J",
east = "ʝ", -- voiced palatal fricative
},
_K_ = {
"K",
north = '"',
south = "Ķ",
east = "", -- hyphen minus
southeast = "", -- em dash
southwest = "", -- en dash
"Κ", -- kappa uppercase
"κ", -- kappa lowercase
north = "k",
northwest = "Κ", -- Greek kappa
west = "Ķ",
},
_k_ = {
"k",
north = '"',
south = "ķ",
east = "", -- hyphen minus
southeast = "", -- em dash
southwest = "", -- en dash
"Κ", -- kappa uppercase
"κ", -- kappa lowercase
north = "K",
northwest = "κ", -- Greek kappa
west = "ķ",
},
_L_ = {
"L",
north = "'",
north = "l",
northeast = "Ĺ",
northwest = "Ľ",
east = "+",
west = "Ł",
south = "Ļ",
southeast = "£",
southeast = "Λ", -- Greek lambda
southwest = "", -- abbreviation for vel (Latin or)
"Λ",
"λ",
"ɫ", -- dark l, velarized alveolar lateral approximant IPA
east = "ɫ", -- dark l, velarized alveolar lateral approximant IPA
},
_l_ = {
"l",
north = "'",
north = "L",
northeast = "ĺ",
northwest = "ľ",
east = "+",
west = "ł",
south = "ļ",
southeast = "£",
southeast = "λ", -- Greek lambda
southwest = "", -- abbreviation for vel (Latin or)
"Λ",
"λ",
"ɫ", -- dark l, velarized alveolar lateral approximant IPA
east = "ɫ", -- dark l, velarized alveolar lateral approximant IPA
},
_M_ = {
"M",
north = "m",
northeast = "Μ", -- Greek mu
east = "ɱ", -- labiodental nasal IPA
west = "Μ", -- upptercase mu
},
_m_ = {
"m",
north = "M",
northeast = "μ", -- Greek mu
east = "ɱ", -- labiodental nasal IPA
west = "μ", -- lowercase mu
},
_N_ = {
"N",
north = "Ñ",
north = "n",
northeast = "Ń",
northwest = "Ǹ",
east = "ɲ", -- palatal nasal IPA
west = "Ν", -- uppercase nu
southeast = "Ŋ", -- uppercase letter eng (ligature of N and G)
west = "Ñ",
south = "Ņ",
southwest = "Ň", -- Czech
southeast = "Ŋ", -- uppercase letter eng (ligature of N and G)
southwest = "Ν", -- Greek nu
"Ň", -- Czech
},
_n_ = {
"n",
north = "ñ",
north = "N",
northeast = "ń",
northwest = "ǹ",
east = "ɲ", -- palatal nasal IPA
west = "ν", -- lowercase nu
southeast = "ŋ", -- letter eng (ligature of N and G), velar nasal IPA
west = "ñ",
south = "ņ",
southwest = "ň", -- Czech
southeast = "ŋ", -- letter eng (ligature of N and G), velar nasal IPA
southwest = "ν", -- Greek nu
"ň", -- Czech
},
_O_ = {
"O",
north = "Ö",
north = "o",
northeast = "Ó",
northwest = "Ò",
east = "Ô",
west = "Õ",
south = "Ǫ",
southeast = "Œ",
southeast = "Ö",
southwest = "Ø",
"Ō",
"ɔ", -- open o, open-mid back rounded vowel IPA
"ɒ", -- turned alpha, open back rounded vowel IPA
"Œ",
},
_o_ = {
"o",
north = "ö",
north = "O",
northeast = "ó",
northwest = "ò",
east = "ô",
west = "õ",
south = "ǫ",
southeast = "œ",
southeast = "ö",
southwest = "ø",
"ō",
"ɔ", -- open o, open-mid back rounded vowel IPA
"ɒ", -- turned alpha, open back rounded vowel IPA
"œ",
},
_P_ = {
"P",
west = "Π", -- uppercase pi
north = "p",
northwest = "Π", -- Greek pi
west = "§", -- section sign
south = "",
southwest = "£", -- British pound currency
"Φ", -- Greek phi
"Ψ", -- Greek psi
},
_p_ = {
"p",
west = "π", -- lowercase pi
north = "P",
northwest = "π", -- Greek pi
west = "", -- pilcrow (paragraph) sign
south = "",
southwest = "£", -- British pound currency
"φ", -- Greek phi
"ψ", -- Greek psi
},
_Q_ = {
"Q",
north = "[",
northeast = "{",
--- @todo Render q̃ correctly on key (not a problem in textbox?)
--east = {"q̃"}, -- Old/Middle French abbreviation of que
north = "q",
south = "",
},
_q_ = {
"q",
north = "[",
northeast = "{",
--- @todo Render q̃ correctly on key (not a problem in textbox?)
--east = {"q̃"}, -- Old/Middle French abbreviation of que
north = "Q",
south = "",
},
_R_ = {
"R",
north = "ρ", -- lowercase rho
north = "r",
northeast = "Ŕ",
northwest = "Ρ ", -- uppercase rho
east = "ɾ", -- alveolar flap or tap IPA
west = "Ř", -- r with háček (Czech)
northwest = "® ",
east = "Ř", -- alveolar flap or tap IPA
west = "ɾ", -- r with háček (Czech)
south = "Ŗ", -- r cedilla (Latvian)
southeast = "ɻ", -- retroflex approximant IPA
southwest = "ɹ", -- alveolar approximant IPA
"ʀ", -- uvular trill IPA
"ʁ", -- voiced uvular fricative IPA
"", -- Russian ruble
},
_r_ = {
"r",
north = "ρ", -- lowercase rho
north = "R",
northeast = "ŕ",
northwest = "Ρ ", -- uppercase rho
east = "ɾ", -- alveolar flap or tap IPA
west = "ř", -- r with háček (Czech)
northwest = "® ",
east = "ř", -- alveolar flap or tap IPA
west = "ɾ", -- r with háček (Czech)
south = "ŗ", -- r cedilla (Latvian)
southeast = "ɻ", -- retroflex approximant IPA
southwest = "ɹ", -- alveolar approximant IPA
"ʀ", -- uvular trill IPA
"ʁ", -- voiced uvular fricative IPA
"ʁ",
"", -- Russian ruble currency
},
_S_ = {
"S",
north = "", -- uppercase eszett
north = "s",
northeast = "Ś",
northwest = "ʃ", -- esh, voiceless palato-alveolar fricative IPA
east = "Ŝ",
west = "Š",
south = "Ş",
southeast = "$",
southeast = "", -- German eszett uppercase
southwest = "",
"",
"ſ", -- long s
"Σ", -- uppercase sigma
"Σ", -- Greek sigma
},
_s_ = {
"s",
north = "ß", -- lowercase eszett
north = "S",
northeast = "ś",
northwest = "ʃ", -- esh, voiceless palato-alveolar fricative IPA
east = "ŝ",
west = "š",
south = "ş",
southeast = "$",
southeast = "ß", -- German eszett
southwest = "",
"",
"ſ", -- long s
"σ", -- lowercase sigma
"ς", -- lowercase word-end sigma
"σ", -- Greek sigma (beginning or the middle of the word)
},
_T_ = {
"T",
north = "θ",
north = "t",
northeast = "Þ",
northwest = "Ț",
east = "Ʈ",
west = "Ť",
south = "Ţ",
southeast = "ʈ",
southeast = "",
southwest = "",
"Τ",
"τ",
"", -- Kazakhstani tenge currency
"Θ", -- Greek theta
"Τ", -- Greek tau
},
_t_ = {
"t",
north = "θ",
north = "T",
northeast = "þ",
northwest = "ț",
east = "Ʈ",
east = "ʈ",
west = "ť",
south = "ţ",
southeast = "ʈ",
southeast = "",
southwest = "",
"Τ",
"τ",
"", -- Kazakhstani tenge currency
"θ", -- Greek theta
"τ", -- Greek tau
},
_U_ = {
"U",
north = "Ü",
north = "u",
northeast = "Ú",
northwest = "Ù",
east = "Û",
west = "Ũ",
south = "Ų",
southeast = "Ü",
southwest = "Ů",
"Ū",
"ʌ", -- turned v, open-mid back unrounded vowel IPA
"ɒ", -- turned alpha, open back rounded vowel IPA
},
_u_ = {
"u",
north = "ü",
north = "U",
northeast = "ú",
northwest = "ù",
east = "û",
west = "ũ",
south = "ų",
southeast = "ü",
southwest = "ů",
"ū",
"ʌ", -- turned v, open-mid back unrounded vowel IPA
"ɒ", -- turned alpha, open back rounded vowel IPA
},
_V_ = {
"V",
north = "ʌ", -- open-mid back unrounded vowel IPA
north = "v", -- open-mid back unrounded vowel IPA
northeast = "ʌ",
northwest = "Ʋ", -- v with hook
east = "",
west = "",
},
_v_ = {
"v",
north = "ʌ", -- open-mid back unrounded vowel IPA
north = "V",
northeast = "ʌ", -- open-mid back unrounded vowel IPA
northwest = "ʋ", -- v with hook, labiodental approximant IPA
east = "",
west = "",
},
_W_ = {
"W",
north = "]",
northeast = "}",
northwest = "ʍ", -- inverted w, voiceless labial-velar approximant IPA
north = "w",
west = "ʍ", -- inverted w, voiceless labial-velar approximant IPA
east = "Ƿ", -- wynn, Old English for /w/
},
_w_ = {
"w",
north = "]",
northeast = "}",
northwest = "ʍ", -- inverted w, voiceless labial-velar approximant IPA
north = "W",
west = "ʍ", -- inverted w, voiceless labial-velar approximant IPA
east = "ƿ", -- wynn, Old English for /w/
},
_X_ = {
"X",
east = "Χ", -- uppercase chi
west = "Ξ", -- uppercase xi
north = "x",
alt_label = "Σ",
northwest = "Η", -- Greek eta
northeast = "Ξ", -- Greek ksi
west = "Ο", -- Greek omicron
east = "Ρ", -- Greek rho
southwest = "Ε", -- Greek epsilon
south = "Χ", -- Greek chi
southeast = "Ω", -- Greek omega
"Α", -- Greek alpha
"Σ", -- Greek sigma
},
_x_ = {
"x",
east = "χ", -- lowercase chi
west = "ξ", -- lowercase xi
north = "X",
alt_label = "Σ",
northwest = "η", -- Greek eta
northeast = "ξ", -- Greek ksi
west = "ο", -- Greek omicron
east = "ρ", -- Greek rho
southwest = "ε", -- Greek epsilon
south = "χ", -- Greek chi
southeast = "ω", -- Greek omega
"α", -- Greek alpha
"σ", -- Greek sigma (beginning or the middle of the word)
"ς", -- Greek sigma (end of the word)
},
_Y_ = {
"Y",
north = "Ŷ",
north = "y",
northeast = "Ý",
northwest = "",
east = "Ÿ",
west = "",
south = "ʎ", -- palatal lateral approximant IPA (looks like mirror lambda, but actually upside down y)
southeast = "ʏ", -- near-close, near-front rounded vowel IPA
southwest = "Υ", -- uppercase upsilon
southwest = "Ŷ",
"¥", -- Japanese Yen/Chinese Yuan currency
"Τ", -- Greek upsilon
},
_y_ = {
"y",
north = "ŷ",
north = "Y",
northeast = "ý",
northwest = "",
east = "ÿ",
east = "ʏ", -- near-close, near-front rounded vowel IPA
west = "",
south = "ʎ", -- palatal lateral approximant IPA (looks like mirror lambda, but actually upside down y)
southeast = "ʏ", -- near-close, near-front rounded vowel IPA
southwest = "υ", -- lowercase upsilon
southeast = "ÿ",
southwest = "ŷ",
"¥",
"υ", -- Greek upsilon
},
_Z_ = {
"Z",
northeast = "Ź",
northwest = "Ζ", -- zeta uppercase
north = "z",
northeast = "Ζ", -- Greek zeta
east = "Ź",
west = "Ž",
south = "ʐ", -- voiced retroflex sibilant fricative IPA
southeast = "ʒ", -- ezh, voiced palato-alveolar fricative IPA
@ -504,11 +622,120 @@ return {
},
_z_ = {
"z",
northeast = "ź",
northwest = "ζ", -- zeta lowercase
north = "Z",
northeast = "ζ", -- Greek zeta
east = "ź",
west = "ž",
south = "ʐ", -- voiced retroflex sibilant fricative IPA
southeast = "ʒ", -- ezh, voiced palato-alveolar fricative IPA
southwest = "ż",
},
-- _1_ and _1p: numeric key 1 and its popup sibling (they have north swipe ups of each other, the rest is the same)
-- _1n and _1s: numpad key 1 (layer 2), -- superscript key 1 (layer 2, shifted)
_1_ = { "1", north = "!", alt_label = "!", northeast = "¡", south = "'", southeast = "¿", east = "?", },
_1p = { "!", north = "1", alt_label = "1", northeast = "¡", south = "'", southeast = "¿", east = "?", },
_1n = { "1", north = "¹", northeast = "", northwest = "", east = "", west = "¼", south = "", southwest = "½", southeast = "", "", "", "", },
_1s = { "¹", north = "1", northeast = "", northwest = "", east = "", west = "¼", south = "", southwest = "½", southeast = "", "", "", "", },
_2_ = { "2", north = "@", alt_label = "@", northeast = "~", northwest = "http://", east = "-", west = "https://", south = '"', southeast = "", southwest = "/", },
_2p = { "@", north = "2", alt_label = "2", northeast = "~", northwest = "http://", east = "-", west = "https://", south = '"', southeast = "", southwest = "/", },
_2n = { "2", north = "²", northeast = "", east = "½", south = "", southeast = "", }, -- numpad 2
_2s = { "²", north = "2", northeast = "", east = "½", south = "", southeast = "", }, -- superscript 2
_3_ = { "3", north = "#", alt_label = "#", northeast = "", northwest = "", east = "", west = "", south = "", southeast = "", southwest = "", ":)", ":|", ":(", },
_3p = { "#", north = "3", alt_label = "3", northeast = "", northwest = "", east = "", west = "", south = "", southeast = "", southwest = "", ":)", ":|", ":(", },
_3n = { "3", north = "³", northwest = "¾", east = "", west = "", southwest = "", south = "", }, -- numpad 3
_3s = { "³", north = "3", northwest = "¾", east = "", west = "", southwest = "", south = "", }, -- superscript 3
_4_ = { "4", north = "$", alt_label = "$", northeast = "", northwest = "¥", east = "", west = "£", south = "", southeast = "¢", southwest = "", "", "", "", },
_4p = { "$", north = "4", alt_label = "4", northeast = "", northwest = "¥", east = "", west = "£", south = "", southeast = "¢", southwest = "", "", "", "", },
_4n = { "4", north = "", east = "¼", south = "", southeast = "", }, -- numpad 4
_4s = { "", north = "4", east = "¼", south = "", southeast = "", }, -- superscript 4
_5_ = { "5", north = "%", alt_label = "%", northeast = "", northwest = "", east = "", west = "¼", south = "½", southeast = "", southwest = "¾", },
_5p = { "%", north = "5", alt_label = "5", northeast = "", northwest = "", east = "", west = "¼", south = "½", southeast = "", southwest = "¾", },
_5n = { "5", north = "", northeast = "", east = "", south = "", southeast = "", }, -- numpad 5
_5s = { "", north = "5", northeast = "", east = "", south = "", southeast = "", }, -- superscript 5
-- diacritics. Symbols in quotation marks might look weird, however they should work fine.
_6_ = {
"6",
north = "^",
alt_label = "^",
northeast = { label = "◌́", key = "́", }, -- Combining Acute Accent
northwest = { label = "◌̀", key = "̀", }, -- Combinig Grave Accent
east = { label = "◌̂", key = "̂", }, -- Combining Circumflex Accent
west = { label = "◌̃", key = "̃", }, -- Combining Tilde
south = { label = "◌̧", key = "̧", }, -- Combining Cedilla
southeast = { label = "◌̈", key = "̈", }, -- Combining Diaeresis (Umlaut)
southwest = { label = "◌̇", key = "̇", }, -- Combining Dot Above
{ label = "◌̄", key = "̄", }, -- Combining Macron
{ label = "◌̌", key = "̌", }, -- Combining Caron
{ label = "◌̨", key = "̨", }, -- Combining Ogonek
},
_6p = {
"^",
north = "6",
alt_label = "6",
northeast = { label = "◌́", key = "́", }, -- Combining Acute Accent
northwest = { label = "◌̀", key = "̀", }, -- Combinig Grave Accent
east = { label = "◌̂", key = "̂", }, -- Combining Circumflex Accent
west = { label = "◌̃", key = "̃", }, -- Combining Tilde
south = { label = "◌̧", key = "̧", }, -- Combining Cedilla
southeast = { label = "◌̈", key = "̈", }, -- Combining Diaeresis (Umlaut)
southwest = { label = "◌̇", key = "̇", }, -- Combining Dot Above
{ label = "◌̄", key = "̄", }, -- Combining Macron
{ label = "◌̌", key = "̌", }, -- Combining Caron
{ label = "◌̨", key = "̨", }, -- Combining Ogonek
},
_6n = { "6", north = "", east = "", south = "", }, -- numpad 6
_6s = { "", north = "6", east = "", south = "", }, -- superscript 6
_7_ = { "7", north = "&", alt_label = "&", northeast = "»", northwest = "«", east = "", west = "§", south = "¤", southeast = "", southwest = "", "", "", "", },
_7p = { "&", north = "7", alt_label = "7", northeast = "»", northwest = "«", east = "", west = "§", south = "¤", southeast = "", southwest = "", "", "", "", },
_7n = { "7", north = "", east = "", south = "", southeast = "", }, -- numpad 7
_7s = { "", north = "7", east = "", south = "", southeast = "", }, -- superscript 7
_8_ = { "8", north = "*", alt_label = "*", northeast = "=", northwest = "", east = "+", west = "-", south = "/", southeast = ">", southwest = "<", "", "", "", },
_8p = { "*", north = "8", alt_label = "8", northeast = "=", northwest = "", east = "+", west = "-", south = "/", southeast = ">", southwest = "<", "", "", "", },
_8n = { "8", north = "", east = "", south = "", }, -- numpad 8
_8s = { "", north = "8", east = "", south = "", }, -- superscript 8
_9_ = { "9", north = "(", alt_label = "(", northeast = "_", northwest = "", east = "-", west = "{", south = "[", southeast = "", southwest = "", },
_9p = { "(", north = "9", alt_label = "9", northeast = "_", northwest = "", east = "-", west = "{", south = "[", southeast = "", southwest = "", },
_9n = { "9", north = "", east = "", south = "", }, -- numpad 9
_9s = { "", north = "9", east = "", south = "", }, -- superscript 9
_0_ = { "0", north = ")", alt_label = ")", northwest = "", west = "}", south = "]", southwest = "", },
_0p = { ")", north = "0", alt_label = "0", northwest = "", west = "}", south = "]", southwest = "", },
_0n = { "0", north = "", south = "", }, -- numpad 0
_0s = { "", north = "0", south = "", }, -- superscript 0
sla = { "/", north = "÷", alt_label = "÷", northeast = "", east = "", }, -- numpad slash
sl2 = { "÷", north = "/", alt_label = "/", northeast = "", east = "", }, -- superscript slash
eql = { "=", north = "", alt_label = "", northwest = "", west = "", south = "", southwest = "", }, -- equality
eq2 = { "", north = "=", alt_label = "=", northwest = "", west = "", south = "", southwest = "", }, -- popup sibling
ls1 = { "<", north = "", alt_label = "", south = "", }, -- "less than" sign
ls2 = { "", north = "<", alt_label = "<", south = "", }, -- (popup sibling)
mr1 = { ">", north = "", alt_label = "", south = "", }, -- "more than"
mr2 = { "", north = ">", alt_label = ">", south = "", }, -- (popup sibling)
pls = { "+", north = "±", alt_label = "±", }, -- plus sign
pl2 = { "±", north = "+", alt_label = "+", }, -- (popup sibling)
mns = { "-", north = "", alt_label = "", }, -- minus sign
mn2 = { "", north = "-", alt_label = "-", }, -- (popup sibling)
dsh = { "-", north = "", alt_label = "", south = "", }, -- dashes
dgr = { "", north = "", alt_label = "", }, -- dagger
tpg = { "", north = "§", alt_label = "§", northeast = "", northwest = "", east = "¤", west = "", south = "®", southeast = "🄯", southwest = "©", }, -- typography symbols
mth = { "", north = "",alt_label = "", northeast = "", northwest = "", east = "", west = "", south = "", southeast = "", southwest = "", "", "", "", }, -- math operations 1
mt2 = { "", north = "", alt_label = "", northeast = "", northwest = "", east = "𝔸", west = "", south = "𝕀", southeast = "", southwest = "𝕌", "", "", "", }, -- math operations 2
int = { "", north = "", alt_label = "", northeast = "", northwest = "", east = "", west = "", south = "", southeast = "", southwest = "", "", "", "", }, -- integrals
dif = { "", north = "", alt_label = "", northeast = "", east = "", south = "", southeast = "", }, -- math operations 3
df2 = { "", north = "", alt_label = "", northeast = "", northwest = "", east = "", west = "", }, -- math operations 4
pdc = { "*", north = "", alt_label = "", south = "", }, -- asterisk, cross-product and dot-prodcuts symbols
pd2 = { "", north = "*", alt_label = "*", south = "", },
bar = { "|", north = "¦", alt_label = "¦", }, -- bars like pipe and broken bar
prm = { "", north = "", alt_label = "", }, -- per mile types
hsh = { "#", north = "", alt_label = "", }, -- hash and "No." sign
hs2 = { "", north = "#", alt_label = "#", },
}

@ -1,99 +1,255 @@
return {
_Je_ = {
"Ж",
north = "Ӂ", -- Ж with breve (Moldavian)
},
_je_ = {
"ж",
north = "ӂ", -- ж with breve (Moldavian)
},
_Ye_ = {
"Е",
north = "Ё",
},
_ye_ = {
"е",
north = "ё",
},
_SH_ = {
"Ь",
north = "Ъ",
},
_sh_ = {
"ь",
north = "ъ",
},
--
_KA_ = {
"А",
north = "Ә",
},
_ka_ = {
"а",
north = "ә",
},
_KI_ = {
"Ы",
north = "І",
},
_ki_ = {
"ы",
north = "і",
},
_KN_ = {
"Н",
north = "Ң",
},
_kn_ = {
"н",
north = "ң",
},
_KG_ = {
"Г",
north = "Ғ",
},
_kg_ = {
"г",
north = "ғ",
},
_KU_ = {
"У",
north = "Ү",
northeast = "Ұ",
},
_ku_ = {
"у",
north = "ү",
northeast = "ұ",
},
_KK_ = {
"К",
north = "Қ",
},
_kk_ = {
"к",
north = "қ",
},
_KO_ = {
"О",
north = "Ө",
},
_ko_ = {
"о",
north = "ө",
},
_KH_ = {
"Х",
north = "Һ",
},
_kh_ = {
"х",
north = "һ",
},
_qe_ = {
"?",
north = "!",
northwest = '"',
pco = { -- period + colon
".",
north = ":",
alt_label = ":",
northeast = "'",
},
northwest = "=",
east = "!",
west = "?",
south = "|",
southeast = "\\",
southwest = "/",
'^',
"&",
"$",
},
cop = { -- colon + period
":",
north = ".",
alt_label = ".",
northeast = "'",
northwest = "=",
east = "!",
west = "?",
south = "|",
southeast = "\\",
southwest = "/",
'^',
"&",
"$",
},
quo = {
'"',
north = "'",
alt_label = "'",
northeast = "»",
northwest = "«",
east = "",
west = "",
south = "`",
southeast = "",
southwest = "",
"",
"",
},
cse = { -- comma + semicolon
",",
north = ";",
alt_label = ";",
northeast = "}",
northwest = "{",
east = { label = "!…", key = "!important;" },
west = "-",
south = "*",
southwest = "0",
southeast = ">",
"[",
"+",
"]",
width = 1.0,
},
sec = { -- semicolon + comma
";",
north = ",",
alt_label = ",",
northeast = "}",
northwest = "{",
east = { label = "!…", key = "!important;" },
west = "-",
south = "*",
southwest = "0",
southeast = ">",
"[",
"*",
"]",
width = 1.0,
},
-- Russian layout, top row of letters (11 keys): й ц у к е/ё н г ш щ з х
_YK = { "Й", north = "й", },
_yk = { "й", north = "Й", },
_TS = { "Ц", north = "ц", },
_ts = { "ц", north = "Ц", },
_UU = { "У", north = "у", northeast = "ұ", east = "Ұ", }, -- with Kazakh letter(s)
_uu = { "у", north = "У", northeast = "Ұ", east = "ұ", }, -- with Kazakh letter(s)
_KK = { "К", north = "к", northeast = "қ", east = "Қ", }, -- with Kazakh letter(s)
_kk = { "к", north = "К", northeast = "Қ", east = "қ", }, -- with Kazakh letter(s)
_YE = { "Е", north = "е", northwest = "ё", west = "Ё", },
_ye = { "е", north = "Е", northwest = "Ё", west = "ё", },
_EN = { "Н", north = "н", northeast = "ң", east = "Ң", }, -- with Kazakh letter(s)
_en = { "н", north = "Н", northeast = "Ң", east = "ң", }, -- with Kazakh letter(s)
_GG = { "Г", north = "г", northeast = "ғ", northwest = "ґ", east = "Ғ", west = "Ґ", }, -- with Kazakh and Ukrainian letter(s)
_gg = { "г", north = "Г", northeast = "Ғ", northwest = "Ґ", east = "ғ", west = "ґ", }, -- with Kazakh and Ukrainian letter(s)
_WA = { "Ш", north = "ш", },
_wa = { "ш", north = "Ш", },
_WE = { "Щ", north = "щ", },
_we = { "щ", north = "Щ", },
_ZE = { "З", north = "з", },
_ze = { "з", north = "З", },
_HA = { "Х", north = "х", northeast = "һ", east = "Һ", }, -- with Kazakh letter(s)
_ha = { "х", north = "Х", northeast = "Һ", east = "һ", }, -- with Kazakh letter(s)
-- Russian layout, middle row of letters (11 keys): ф ы в а п р о л д ж э
_EF = { "Ф", north = "ф", },
_ef = { "ф", north = "Ф", },
_YY = { "Ы", north = "ы", northwest = "і", west = "І", },
_yy = { "ы", north = "Ы", northwest = "І", west = "і", },
_VE = { "В", north = "в", },
_ve = { "в", north = "В", },
_AA = { "А", north = "а", northeast = "ә", east = "Ә", }, -- with Kazakh letter(s)
_aa = { "а", north = "А", northeast = "Ә", east = "ә", }, -- with Kazakh letter(s)
_PE = { "П", north = "п", },
_pe = { "п", north = "П", },
_ER = { "Р", north = "р", },
_er = { "р", north = "Р", },
_OO = { "О", north = "о", northeast = "ө", east = "Ө", }, -- with Kazakh letter(s)
_oo = { "о", north = "О", northeast = "Ө", east = "ө", }, -- with Kazakh letter(s)
_EL = { "Л", north = "л", },
_el = { "л", north = "Л", },
_DE = { "Д", north = "д", },
_de = { "д", north = "Д", },
_JE = { "Ж", north = "ж", northwest = "ӂ", west = "Ӂ", }, -- Ж with breve (Moldavian)
_je = { "ж", north = "Ж", northwest = "Ӂ", west = "ӂ", }, -- ж with breve (Moldavian)
_EE = { "Э", north = "э", northwest = "є", west = "Є", }, -- with Ukrainian letter(s)
_ee = { "э", north = "Э", northwest = "Є", west = "є", }, -- with Ukrainian letter(s)
-- Russian layout, bottom row of letters (9 keys): я ч с м и т ь/ъ б ю
_YA = { "Я", north = "я", }, -- width is changed is that Shift and Backspace can be 1.5 wide
_ya = { "я", north = "Я", },
_CH = { "Ч", north = "ч", },
_ch = { "ч", north = "Ч", },
_ES = { "С", north = "с", },
_es = { "с", north = "С", },
_EM = { "М", north = "м", },
_em = { "м", north = "М", },
_II = { "И", north = "и", northeast = "і", northwest = "ї", west = "ї", east = "і", }, -- with Kazakh and Ukrainian letter(s)
_ii = { "и", north = "И", northeast = "I", northwest = "Ї", west = "ї", east = "і", }, -- with Kazakh and Ukrainian letter(s)
_TE = { "Т", north = "т", },
_te = { "т", north = "Т", },
_SH = { "Ь", north = "ь", northwest = "ъ", west = "Ъ", },
_sh = { "ь", north = "Ь", northwest = "Ъ", west = "ъ", },
_BE = { "Б", north = "б", },
_be = { "б", north = "Б", },
_YU = { "Ю", north = "ю", northeast = "ү", east = "Ү", }, -- with Kazakh letter(s)
_yu = { "ю", north = "Ю", northeast = "Ү", east = "ү", }, -- with Kazakh letter(s)
-- _1_ and _1p: numeric key 1 and its popup sibling (they have north swipe ups of each other, the rest is the same)
-- _1n and _1s: numpad key 1 (layer 2), -- superscript key 1 (layer 2, shifted)
_1_ = { "1", north = "!", alt_label = "!", northeast = "¡", south = "'", southeast = "¿", east = "?", },
_1p = { "!", north = "1", alt_label = "1", northeast = "¡", south = "'", southeast = "¿", east = "?", },
_1n = { "1", north = "¹", northeast = "", northwest = "", east = "", west = "¼", south = "", southwest = "½", southeast = "", "", "", "", },
_1s = { "¹", north = "1", northeast = "", northwest = "", east = "", west = "¼", south = "", southwest = "½", southeast = "", "", "", "", },
_2_ = { "2", north = "@", alt_label = "@", northeast = "~", northwest = "http://", east = "-", west = "https://", south = '"', southeast = "", southwest = "/", },
_2p = { "@", north = "2", alt_label = "2", northeast = "~", northwest = "http://", east = "-", west = "https://", south = '"', southeast = "", southwest = "/", },
_2n = { "2", north = "²", northeast = "", east = "½", south = "", southeast = "", }, -- numpad 2
_2s = { "²", north = "2", northeast = "", east = "½", south = "", southeast = "", }, -- superscript 2
_3_ = { "3", north = "#", alt_label = "#", northeast = "", northwest = "", east = "", west = "", south = "", southeast = "", southwest = "", ":)", ":|", ":(", },
_3p = { "#", north = "3", alt_label = "3", northeast = "", northwest = "", east = "", west = "", south = "", southeast = "", southwest = "", ":)", ":|", ":(", },
_3n = { "3", north = "³", northwest = "¾", east = "", west = "", southwest = "", south = "", }, -- numpad 3
_3s = { "³", north = "3", northwest = "¾", east = "", west = "", southwest = "", south = "", }, -- superscript 3
_4_ = { "4", north = "$", alt_label = "$", northeast = "", northwest = "¥", east = "", west = "£", south = "", southeast = "¢", southwest = "", "", "", "", },
_4p = { "$", north = "4", alt_label = "4", northeast = "", northwest = "¥", east = "", west = "£", south = "", southeast = "¢", southwest = "", "", "", "", },
_4n = { "4", north = "", east = "¼", south = "", southeast = "", }, -- numpad 4
_4s = { "", north = "4", east = "¼", south = "", southeast = "", }, -- superscript 4
_5_ = { "5", north = "%", alt_label = "%", northeast = "", northwest = "", east = "", west = "¼", south = "½", southeast = "", southwest = "¾", },
_5p = { "%", north = "5", alt_label = "5", northeast = "", northwest = "", east = "", west = "¼", south = "½", southeast = "", southwest = "¾", },
_5n = { "5", north = "", northeast = "", east = "", south = "", southeast = "", }, -- numpad 5
_5s = { "", north = "5", northeast = "", east = "", south = "", southeast = "", }, -- superscript 5
-- diacritics. Symbols in quotation marks might look weird, however they should work fine.
_6_ = {
"6",
north = "^",
alt_label = "^",
northeast = { label = "◌́", key = "́", }, -- Combining Acute Accent
northwest = { label = "◌̀", key = "̀", }, -- Combinig Grave Accent
east = { label = "◌̂", key = "̂", }, -- Combining Circumflex Accent
west = { label = "◌̃", key = "̃", }, -- Combining Tilde
south = { label = "◌̧", key = "̧", }, -- Combining Cedilla
southeast = { label = "◌̈", key = "̈", }, -- Combining Diaeresis (Umlaut)
southwest = { label = "◌̇", key = "̇", }, -- Combining Dot Above
{ label = "◌̄", key = "̄", }, -- Combining Macron
{ label = "◌̌", key = "̌", }, -- Combining Caron
{ label = "◌̨", key = "̨", }, -- Combining Ogonek
},
_6p = {
"^",
north = "6",
alt_label = "6",
northeast = { label = "◌́", key = "́", }, -- Combining Acute Accent
northwest = { label = "◌̀", key = "̀", }, -- Combinig Grave Accent
east = { label = "◌̂", key = "̂", }, -- Combining Circumflex Accent
west = { label = "◌̃", key = "̃", }, -- Combining Tilde
south = { label = "◌̧", key = "̧", }, -- Combining Cedilla
southeast = { label = "◌̈", key = "̈", }, -- Combining Diaeresis (Umlaut)
southwest = { label = "◌̇", key = "̇", }, -- Combining Dot Above
{ label = "◌̄", key = "̄", }, -- Combining Macron
{ label = "◌̌", key = "̌", }, -- Combining Caron
{ label = "◌̨", key = "̨", }, -- Combining Ogonek
},
_6n = { "6", north = "", east = "", south = "", }, -- numpad 6
_6s = { "", north = "6", east = "", south = "", }, -- superscript 6
_7_ = { "7", north = "&", alt_label = "&", northeast = "»", northwest = "«", east = "", west = "§", south = "¤", southeast = "", southwest = "", "", "", "", },
_7p = { "&", north = "7", alt_label = "7", northeast = "»", northwest = "«", east = "", west = "§", south = "¤", southeast = "", southwest = "", "", "", "", },
_7n = { "7", north = "", east = "", south = "", southeast = "", }, -- numpad 7
_7s = { "", north = "7", east = "", south = "", southeast = "", }, -- superscript 7
_8_ = { "8", north = "*", alt_label = "*", northeast = "=", northwest = "", east = "+", west = "-", south = "/", southeast = ">", southwest = "<", "", "", "", },
_8p = { "*", north = "8", alt_label = "8", northeast = "=", northwest = "", east = "+", west = "-", south = "/", southeast = ">", southwest = "<", "", "", "", },
_8n = { "8", north = "", east = "", south = "", }, -- numpad 8
_8s = { "", north = "8", east = "", south = "", }, -- superscript 8
_9_ = { "9", north = "(", alt_label = "(", northeast = "_", northwest = "", east = "-", west = "{", south = "[", southeast = "", southwest = "", },
_9p = { "(", north = "9", alt_label = "9", northeast = "_", northwest = "", east = "-", west = "{", south = "[", southeast = "", southwest = "", },
_9n = { "9", north = "", east = "", south = "", }, -- numpad 9
_9s = { "", north = "9", east = "", south = "", }, -- superscript 9
_0_ = { "0", north = ")", alt_label = ")", northwest = "", west = "}", south = "]", southwest = "", },
_0p = { ")", north = "0", alt_label = "0", northwest = "", west = "}", south = "]", southwest = "", },
_0n = { "0", north = "", south = "", }, -- numpad 0
_0s = { "", north = "0", south = "", }, -- superscript 0
sla = { "/", north = "÷", alt_label = "÷", northeast = "", east = "", }, -- numpad slash
sl2 = { "÷", north = "/", alt_label = "/", northeast = "", east = "", }, -- superscript slash
eql = { "=", north = "", alt_label = "", northwest = "", west = "", south = "", southwest = "", }, -- equality
eq2 = { "", north = "=", alt_label = "=", northwest = "", west = "", south = "", southwest = "", }, -- popup sibling
ls1 = { "<", north = "", alt_label = "", south = "", }, -- "less than" sign
ls2 = { "", north = "<", alt_label = "<", south = "", }, -- (popup sibling)
mr1 = { ">", north = "", alt_label = "", south = "", }, -- "more than"
mr2 = { "", north = ">", alt_label = ">", south = "", }, -- (popup sibling)
pls = { "+", north = "±", alt_label = "±", }, -- plus sign
pl2 = { "±", north = "+", alt_label = "+", }, -- (popup sibling)
mns = { "-", north = "", alt_label = "", }, -- minus sign
mn2 = { "", north = "-", alt_label = "-", }, -- (popup sibling)
dsh = { "-", north = "", alt_label = "", south = "", }, -- dashes
dgr = { "", north = "", alt_label = "", }, -- dagger
tpg = { "", north = "§", alt_label = "§", northeast = "", northwest = "", east = "¤", west = "", south = "®", southeast = "🄯", southwest = "©", }, -- typography symbols
mth = { "", north = "", alt_label = "", northeast = "", northwest = "", east = "", west = "", south = "", southeast = "", southwest = "", "", "", "", }, -- math operations 1
mt2 = { "", north = "", alt_label = "", northeast = "", northwest = "", east = "𝔸", west = "", south = "𝕀", southeast = "", southwest = "𝕌", "", "", "", }, -- math operations 2
int = { "", north = "", alt_label = "", northeast = "", northwest = "", east = "", west = "", south = "", southeast = "", southwest = "", "", "", "", }, -- integrals
dif = { "", north = "", alt_label = "", northeast = "", east = "", south = "", southeast = "", }, -- math operations 3
df2 = { "", north = "", alt_label = "", northeast = "", northwest = "", east = "", west = "", }, -- math operations 4
pdc = { "*", north = "", alt_label = "", south = "", }, -- asterisk, cross-product and dot-prodcuts symbols
pd2 = { "", north = "*", alt_label = "*", south = "", },
bar = { "|", north = "¦", alt_label = "¦", }, -- bars like pipe and broken bar
prm = { "", north = "", alt_label = "", }, -- per mile types
hsh = { "#", north = "", alt_label = "", }, -- hash and "No." sign
hs2 = { "", north = "#", alt_label = "#", },
}

@ -3,49 +3,56 @@ local pl_keyboard = require("util").tableDeepCopy(require("ui/data/keyboardlayou
local keys = pl_keyboard.keys
-- Umlaut keys on standard keyboard
keys[1][3][5] = 'Ę'
keys[1][3][6] = 'ę'
keys[1][9][5] = 'Ó'
keys[1][9][6] = 'ó'
keys[2][1][5] = 'Ą'
keys[2][1][6] = 'ą'
keys[2][2][5] = 'Ś'
keys[2][2][6] = 'ś'
keys[2][9][5] = 'Ł'
keys[2][9][6] = 'ł'
keys[3][2][5] = 'Ż'
keys[3][2][6] = 'ż'
keys[3][3][5] = 'Ź'
keys[3][3][6] = 'ź'
keys[3][4][5] = 'Ć'
keys[3][4][6] = 'ć'
keys[3][7][5] = 'Ń'
keys[3][7][6] = 'ń'
-- popup keyboard - move polish characters to east
keys[1][3][1].east = 'Ę'; keys[1][3][1].south = 'Ê'
keys[1][3][2].east = 'ę'; keys[1][3][2].south = 'ê'
keys[1][9][1].east = 'Ó'; keys[1][9][1].northeast = 'Ô'
keys[1][9][2].east = 'ó'; keys[1][9][2].northeast = 'ô'
keys[2][1][1].east = 'Ą'; keys[2][1][1].south = 'Â'
keys[2][1][2].east = 'ą'; keys[2][1][2].south = 'â'
keys[2][2][1].east = 'Ś'; keys[2][2][1].northeast = 'Ŝ'
keys[2][2][2].east = 'ś'; keys[2][2][2].northeast = 'ŝ'
keys[2][9][1].east = 'Ł'; keys[2][9][1].west = '+'
keys[2][9][2].east = 'ł'; keys[2][9][2].west = '+'
keys[3][2][1].east = 'Ż'; keys[3][2][1].southwest = ''
keys[3][2][1].west = 'Ź'; keys[3][2][1].northeast = 'Ž'
keys[3][2][2].east = 'ż'; keys[3][2][2].southwest = ''
keys[3][2][2].west = 'ź'; keys[3][2][2].northeast = 'ž'
keys[3][3][1].east = 'Ź'; keys[3][3][1].north = 'Χ'
keys[3][3][2].east = 'ź'; keys[3][3][2].north = 'χ'
keys[3][4][1].east = 'Ć'; keys[3][4][1].northeast = 'Ĉ'
keys[3][4][2].east = 'ć'; keys[3][4][2].northeast = 'ĉ'
keys[3][7][1].east = 'Ń'; keys[3][7][1].northeast = 'ɲ'
keys[3][7][2].east = 'ń'; keys[3][7][2].northeast = 'ɲ'
--keys[2][3][1].east = 'Ę'; keys[1][3][1].south = 'Ê'
--keys[2][3][2].east = 'ę'; keys[1][3][2].south = 'ê'
keys[2][3][1].east, keys[2][3][1].south = keys[2][3][1].south, keys[2][3][1].east
keys[2][3][2].east, keys[2][3][2].south = keys[2][3][2].south, keys[2][3][2].east
-- keys[2][9][1].east = 'Ó'; keys[1][9][1].northeast = 'Ô'
-- keys[2][9][2].east = 'ó'; keys[1][9][2].northeast = 'ô'
keys[2][9][1].east, keys[2][9][1].south = keys[2][9][1].south, keys[2][9][1].east
keys[2][9][2].east, keys[2][9][2].south = keys[2][9][2].south, keys[2][9][2].east
-- keys[3][1][1].east = 'Ą'; keys[2][1][1].south = 'Â'
-- keys[3][1][2].east = 'ą'; keys[2][1][2].south = 'â'
keys[3][1][1].east, keys[3][1][1].south = keys[3][1][1].south, keys[3][1][1].east
keys[3][1][2].east, keys[3][1][2].south = keys[3][1][2].south, keys[3][1][2].east
-- keys[3][2][1].east = 'Ś'; keys[2][2][1].northeast = 'Ŝ'
-- keys[3][2][2].east = 'ś'; keys[2][2][2].northeast = 'ŝ'
keys[3][2][1].east, keys[3][2][1].northeast = keys[3][2][1].northeast, keys[3][2][1].east
keys[3][2][2].east, keys[3][2][2].northeast = keys[3][2][2].northeast, keys[3][2][2].east
-- keys[3][9][1].east = 'Ł'; keys[2][9][1].west = '+'
-- keys[3][9][2].east = 'ł'; keys[2][9][2].west = '+'
keys[3][9][1].east, keys[3][9][1].west = keys[3][9][1].west, keys[3][9][1].east
keys[3][9][2].east, keys[3][9][2].west = keys[3][9][2].west, keys[3][9][2].east
-- keys[4][2][1].east = 'Ż'; keys[3][2][1].southwest = ''
-- keys[4][2][2].east = 'ż'; keys[3][2][2].southwest = ''
keys[4][2][1].west, keys[4][2][1].southwest = keys[4][2][1].southwest, keys[4][2][1].west
keys[4][2][2].west, keys[4][2][2].southwest = keys[4][2][2].southwest, keys[4][2][2].west
-- keys[4][2][1].west = 'Ź'; keys[3][2][1].northeast = 'Ž'
-- keys[4][2][2].west = 'ź'; keys[3][2][2].northeast = 'ž'
-- ?
-- keys[4][3][1].east = 'Ź'; keys[3][3][1].north = 'Χ'
-- keys[4][3][2].east = 'ź'; keys[3][3][2].north = 'χ'
-- ?
-- keys[4][4][1].east = 'Ć'; keys[3][4][1].northeast = 'Ĉ'
-- keys[4][4][2].east = 'ć'; keys[3][4][2].northeast = 'ĉ'
keys[4][4][1].east, keys[4][4][1].northeast = keys[4][4][1].northeast, keys[4][4][1].east
keys[4][4][2].east, keys[4][4][2].northeast = keys[4][4][2].northeast, keys[4][4][2].east
-- keys[4][7][1].east = 'Ń'; keys[3][7][1].northeast = 'ɲ'
-- keys[4][7][2].east = 'ń'; keys[3][7][2].northeast = 'ɲ'
keys[4][7][1].east, keys[4][7][1].northeast = keys[4][7][1].northeast, keys[4][7][1].east
keys[4][7][2].east, keys[4][7][2].northeast = keys[4][7][2].northeast, keys[4][7][2].east
-- space
keys[4][4].label = ""
keys[5][4].label = ""
return pl_keyboard

@ -1,112 +1,215 @@
local en_popup = require("ui/data/keyboardlayouts/keypopup/en_popup")
local ru_popup = require("ui/data/keyboardlayouts/keypopup/ru_popup")
local com = en_popup.com -- comma (,)
local prd = en_popup.prd -- period (.)
local _at = en_popup._at
local _eq = en_popup._eq -- equals sign (=)
local _Je_ = ru_popup._Je_
local _je_ = ru_popup._je_
local _Ye_ = ru_popup._Ye_
local _ye_ = ru_popup._ye_
-- the Russian soft/hard sign
local _SH_ = ru_popup._SH_
local _sh_ = ru_popup._sh_
-- Kazakh Cyrillic letters: ә і ң ғ ү ұ қ ө һ
local _KA_ = ru_popup._KA_
local _ka_ = ru_popup._ka_
local _KI_ = ru_popup._KI_
local _ki_ = ru_popup._ki_
local _KN_ = ru_popup._KN_
local _kn_ = ru_popup._kn_
local _KG_ = ru_popup._KG_
local _kg_ = ru_popup._kg_
local _KU_ = ru_popup._KU_
local _ku_ = ru_popup._ku_
local _KK_ = ru_popup._KK_
local _kk_ = ru_popup._kk_
local _KO_ = ru_popup._KO_
local _ko_ = ru_popup._ko_
local _KH_ = ru_popup._KH_
local _kh_ = ru_popup._kh_
-- Question mark, exclamation, quotes
local _qe_ = ru_popup._qe_
local pco = ru_popup.pco
local cop = ru_popup.cop
local cse = ru_popup.cse
local sec = ru_popup.sec
local quo = ru_popup.quo
-- Russian layout, top row of letters
local _YK = ru_popup._YK
local _yk = ru_popup._yk
local _TS = ru_popup._TS
local _ts = ru_popup._ts
local _UU = ru_popup._UU
local _uu = ru_popup._uu
local _KK = ru_popup._KK
local _kk = ru_popup._kk
local _YE = ru_popup._YE
local _ye = ru_popup._ye
local _EN = ru_popup._EN
local _en = ru_popup._en
local _GG = ru_popup._GG
local _gg = ru_popup._gg
local _WA = ru_popup._WA
local _wa = ru_popup._wa
local _WE = ru_popup._WE
local _we = ru_popup._we
local _ZE = ru_popup._ZE
local _ze = ru_popup._ze
local _HA = ru_popup._HA
local _ha = ru_popup._ha
-- Russian layout, middle row of letters
local _EF = ru_popup._EF
local _ef = ru_popup._ef
local _YY = ru_popup._YY
local _yy = ru_popup._yy
local _VE = ru_popup._VE
local _ve = ru_popup._ve
local _AA = ru_popup._AA
local _aa = ru_popup._aa
local _PE = ru_popup._PE
local _pe = ru_popup._pe
local _ER = ru_popup._ER
local _er = ru_popup._er
local _OO = ru_popup._OO
local _oo = ru_popup._oo
local _EL = ru_popup._EL
local _el = ru_popup._el
local _DE = ru_popup._DE
local _de = ru_popup._de
local _JE = ru_popup._JE
local _je = ru_popup._je
local _EE = ru_popup._EE
local _ee = ru_popup._ee
-- Russian layout, bottom row of letters
local _YA = ru_popup._YA
local _ya = ru_popup._ya
local _CH = ru_popup._CH
local _ch = ru_popup._ch
local _ES = ru_popup._ES
local _es = ru_popup._es
local _EM = ru_popup._EM
local _em = ru_popup._em
local _II = ru_popup._II
local _ii = ru_popup._ii
local _TE = ru_popup._TE
local _te = ru_popup._te
local _SH = ru_popup._SH
local _sh = ru_popup._sh -- the Russian soft/hard sign
local _BE = ru_popup._BE
local _be = ru_popup._be
local _YU = ru_popup._YU
local _yu = ru_popup._yu
-- other
local _1_ = ru_popup._1_ -- numeric key 1
local _1p = ru_popup._1p -- numeric key 1, popup sibling (they have north swipe ups of each other, the rest is the same)
local _1n = ru_popup._1n -- numpad key 1
local _1s = ru_popup._1s -- superscript key 1
local _2_ = ru_popup._2_
local _2p = ru_popup._2p
local _2n = ru_popup._2n
local _2s = ru_popup._2s
local _3_ = ru_popup._3_
local _3p = ru_popup._3p
local _3n = ru_popup._3n
local _3s = ru_popup._3s
local _4_ = ru_popup._4_
local _4p = ru_popup._4p
local _4n = ru_popup._4n
local _4s = ru_popup._4s
local _5_ = ru_popup._5_
local _5p = ru_popup._5p
local _5n = ru_popup._5n
local _5s = ru_popup._5s
local _6_ = ru_popup._6_
local _6p = ru_popup._6p
local _6n = ru_popup._6n
local _6s = ru_popup._6s
local _7_ = ru_popup._7_
local _7p = ru_popup._7p
local _7n = ru_popup._7n
local _7s = ru_popup._7s
local _8_ = ru_popup._8_
local _8p = ru_popup._8p
local _8n = ru_popup._8n
local _8s = ru_popup._8s
local _9_ = ru_popup._9_
local _9p = ru_popup._9p
local _9n = ru_popup._9n
local _9s = ru_popup._9s
local _0_ = ru_popup._0_
local _0p = ru_popup._0p
local _0n = ru_popup._0n
local _0s = ru_popup._0s
local sla = ru_popup.sla
local sl2 = ru_popup.sl2
local eql = ru_popup.eql
local eq2 = ru_popup.eq2
local pls = ru_popup.pls
local pl2 = ru_popup.pl2
local mns = ru_popup.mns
local mn2 = ru_popup.mn2
local dsh = ru_popup.dsh
local dgr = ru_popup.dgr
local tpg = ru_popup.tpg
local mth = ru_popup.mth
local mt2 = ru_popup.mt2
local int = ru_popup.int
local dif = ru_popup.dif
local df2 = ru_popup.df2
local ls1 = ru_popup.ls1
local ls2 = ru_popup.ls2
local mr1 = ru_popup.mr1
local mr2 = ru_popup.mr2
local pdc = ru_popup.pdc
local pd2 = ru_popup.pd2
local bar = ru_popup.bar
local prm = ru_popup.prm
local hsh = ru_popup.hsh
local hs2 = ru_popup.hs2
return {
min_layer = 1,
max_layer = 8,
shiftmode_keys = {[""] = true, ["1/2"] = true, ["2/2"] = true},
symbolmode_keys = {["123"] = true, ["АБВ"] = true, ["ещё"] = true},
utf8mode_keys = {["🌐"] = true},
umlautmode_keys = {["αβγ"] = true},
max_layer = 4,
shiftmode_keys = { [""] = true },
symbolmode_keys = { [""] = true },
utf8mode_keys = { ["🌐"] = true },
-- Width of any key can be modified by adding "width = 1.0, " in the list.
keys = {
-- first row
{ -- 1 2 3 4 5 6 7 8
{ "Й", "й", "'", "`", "", "", "", "`", },
{ "Ц", "ц", "[", "1", "ς", "ς", "¹", "1", },
{ _KU_, _ku_, "]", "2", "Ε", "ε", "²", "2", },
{ _KK_, _kk_, "{", "3", "Ρ", "ρ", "³", "3", },
{ _Ye_, _ye_, "}", "4", "Τ", "τ", "", "4", },
{ _KN_, _kn_, "#", "5", "Υ", "υ", "", "5", },
{ _KG_, _kg_, "%", "6", "Θ", "θ", "", "6", },
{ "Ш", "ш", "^", "7", "Ι", "ι", "", "7", },
{ "Щ", "щ", "*", "8", "Ο", "ο", "", "8", },
{ "З", "з", "+", "9", "Π", "π", "", "9", },
{ _KH_, _kh_, _eq, "0", "²", "", "", "0", },
-- First row
{ -- R r S s
{ _1p, _1_, "`", "!", },
{ _2p, _2_, "", "¡", },
{ _3p, _3_, "", dsh, },
{ _4p, _4_, "", "_", },
{ _5p, _5_, "", quo, },
{ _6p, _6_, eq2, eql, },
{ _7p, _7_, _7s, _7n, },
{ _8p, _8_, _8s, _8n, },
{ _9p, _9_, _9s, _9n, },
{ _0p, _0_, sec, cse, },
{ sec, cse, "Ѣ", "ѣ", }, -- comma/semicolon with CSS popup block, plus Russian old letter yat (ять)
},
-- Second row
{ -- R r S s
{ _YK, _yk, dif, "?", },
{ _TS, _ts, int, "¿", },
{ _UU, _uu, mth, "~", },
{ _KK, _kk, mt2, "\\", },
{ _YE, _ye, df2, bar, },
{ _EN, _en, sl2, sla, },
{ _GG, _gg, _4s, _4n, },
{ _WA, _wa, _5s, _5n, },
{ _WE, _we, _6s, _6n, },
{ _ZE, _ze, mn2, mns, },
{ _HA, _ha, "Ѳ", "ѳ", }, -- Russian old letter fita (фита)
},
-- second row
{ -- 1 2 3 4 5 6 7 8
{ "Ф", "ф", "_", "+", "Α", "α", "", "«", },
{ _KI_, _ki_, "\\", "-", "Σ", "σ", "", "»", },
{ "В", "в", "_", "/", "Δ", "δ", "", "", },
{ _KA_, _ka_, "~", ":", "Φ", "φ", "", "", },
{ "П", "п", "<", ";", "Γ", "γ", "", "", },
{ "Р", "р", ">", "(", "Η", "η", "©", "", },
{ _KO_, _ko_, "", ")", "Ξ", "ξ", "", "", },
{ "Л", "л", "£", "$", "Κ", "κ", "🄯", "", },
{ "Д", "д", "¥", "&", "Λ", "λ", "®", "§", },
{ _Je_, _je_, "", _at, "×", "×", "½", "¤", },
{ "Э", "э", "¢", "", "", "", "¼", "", },
-- Third row
{ -- R r S s
{ _EF, _ef, ls2, ls1, },
{ _YY, _yy, mr2, mr1, },
{ _VE, _ve, dgr, "(", },
{ _AA, _aa, tpg, ")", },
{ _PE, _pe, hs2, hsh, },
{ _ER, _er, pd2, pdc, },
{ _OO, _oo, _1s, _1n, },
{ _EL, _el, _2s, _2n, },
{ _DE, _de, _3s, _3n, },
{ _JE, _je, pl2, pls, },
{ _EE, _ee, "Ѵ", "ѵ", }, -- Russian old letter izhitsa (ижица)
},
-- third row
{ -- 1 2 3 4 5 6 7 8
{ "", "", "2/2", "1/2", "", "", "", "",
width = 1.0
},
{ "Я", "я", "", "", "Ζ", "ζ", "", "±", },
{ "Ч", "ч", "", "", "Χ", "χ", "", "º", },
{ "С", "с", com, com, "Ψ", "ψ", "", "", },
{ "М", "м", prd, prd, "Ω", "ω", "", "", },
{ "И", "и", "?", "?", "Β", "β", "", "¿", },
{ "Т", "т", "!", "!", "Ν", "ν", "", "¡", },
{ _SH_, _sh_, "", "", "Μ", "μ", "", "", },
{ "Б", "б", "", "", "", "", "", "", },
{ "Ю", "ю", "|", "|", "", "", "|", "|", },
{ label = "",
width = 1.0,
bold = false
},
-- Fourth row
{ -- R r S s
{ label = "", width = 1.0, }, -- Shift
{ _YA, _ya, prm, "{", },
{ _CH, _ch, "°", "}", },
{ _ES, _es, "«", "«", },
{ _EM, _em, "»", "»", },
{ _II, _ii, "", "[", },
{ _TE, _te, "", "]", },
{ _SH, _sh, _0s, _0n, },
{ _BE, _be, "", "", },
{ _YU, _yu, "", "", },
{ label = "", width = 1.0, }, -- Backspace
},
-- fourth row
{ -- 1 2 3 4 5 6 7 8
{ "123", "123", "АБВ", "АБВ", "ещё", "ещё", "ещё", "ещё",
width = 1.0},
{ label = "🌐", },
{ "αβγ", "αβγ", "αβγ", "αβγ", "αβγ", "αβγ", "αβγ", "αβγ", },
{ label = "пробел",
" ", " ", " ", " ", " ", " ", " ", " ",
width = 4.0},
{ _qe_, _qe_, "", "", _qe_, _qe_, "", "", },
{ com, com, "", "", com, com, "", "", }, -- arrow down
{ prd, prd, "", "", prd, prd, "", "", },
{ label = "",
"\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n",
width = 1.0,
bold = true
},
-- Fifth row
{ -- R r S s
{ label = "", width = 1.5, bold = true, }, -- SYM key
{ label = "🌐", }, -- Globe key
{ cop, pco, cop, pco, }, -- period/colon with RegEx popup block
{ label = "_", " ", " ", " ", " ", width = 4.0, }, -- Spacebar
{ label = "", }, -- Arrow left
{ label = "", }, -- Arrow right
{ label = "", "\n","\n","\n","\n", width = 1.5, }, -- Enter
},
},
}

@ -2,70 +2,89 @@
local tr_keyboard = require("util").tableDeepCopy(require("ui/data/keyboardlayouts/en_keyboard"))
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).
-- Insert 2 additional key at the end of first 3 rows.
-- 5th and 6th modes are from Kurdish and Azerbaijani alphabets.
-- Add Ğ, G with breve
-- Turkish Lira currency
table.insert(keys[1],
-- 1 2 3 4 5 6 7 8
{ "Ğ", "ğ", "«", "μ", "Ź", "ź", "γ", "σ", }
{ "", "", "", "", }
)
-- Add Ü, U with umlaut
-- empty key to make extra keys on other rows fit
table.insert(keys[1],
-- 1 2 3 4 5 6 7 8
{ "Ü", "ü", "»", "β", "Ə", "ə", "δ", "ψ", }
{ "", "", "", "", }
)
-- Add Ş, S with cedilla
-- Add Ğ, G with breve
table.insert(keys[2],
-- 1 2 3 4 5 6 7 8
{ "Ş", "ş", "`", "α", "", "", "ε", "χ", }
{ { "Ğ", north = "ğ", }, { "ğ", north = "Ğ", }, { "Ź", north = "ź", }, { "ź", north = "Ź", }, }
)
-- Add İ and i, dotted I and i
-- Add Ü, U with umlaut
table.insert(keys[2],
-- 1 2 3 4 5 6 7 8
{ "İ", "i", "", "θ", "", "", "η", "τ", }
{ { "Ü", 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 = "", }, }
)
-- Add Ö, O with umlaut
table.insert(keys[3], 9,
-- 1 2 3 4 5 6 7 8
{ "Ö", "ö", "²", "π", "Ł", "ł", "ι", "ρ", }
table.insert(keys[4], 9,
{ { "Ö", north = "ö", }, { "ö", north = "Ö", }, { "Ł", north = "ł", }, { "ł", north = "Ł", }, }
)
-- Add Ç, C with cedilla
table.insert(keys[3], 10,
-- 1 2 3 4 5 6 7 8
{ "Ç", "ç", "", "ω", "Ř", "ř", "ν", "κ", }
table.insert(keys[4], 10,
{ { "Ç", north = "ç", }, { "ç", north = "Ç", }, { "Ř", north = "ř", }, { "ř", north = "Ř", }, }
)
-- 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]
-- Add forward slash and .com symbol to 4th row since we have lot of empty space
--and most phones do this.
table.insert(keys[4], 7,
-- 1 2 3 4 5 6 7 8
{ ".com", "/", "", "λ", "\"", "\"", "ζ", "ξ", }
table.insert(keys[5], 7,
{ ".com", "/", "\"", "\"", }
)
-- Make .com and Unicode buttons larger since we still have space.
keys[4][3].width = 1.5
keys[4][7].width = 1.5
--
keys[5][3].width = 1.5
keys[5][7].width = 1.5
-- Change lowercase "i" to "ı"
keys[1][8][2] = "ı"
-- 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
}
-- Translate the "space" string
keys[4][4].label = "boşluk"
keys[2][8][1] = {
"I", -- dotless I
north = "ı", -- dotless i (Turkish)
northeast = "Í",
northwest = "Ì",
east = "Î",
west = "Ĩ",
south = "Į",
southeast = "Ï",
southwest = "ɪ",
"Ī",
"Ι", -- Greek iota
"I",
}
--Or remove / and move Ü to 3rd row.
--keys[4][7] = keys[3][11]
--keys[3][11] = keys[1][12]
--table.remove(keys[1], 12)
--Shrink Backspace, Shift, Sym, Unicode buttons to normal.
--keys[3][1].width = 1
--keys[3][11].width = 1
--keys[4][1].width = 1
--keys[4][3].width = 1
-- Translate the "space" string
keys[5][4].label = "boşluk"
return tr_keyboard

@ -328,7 +328,7 @@ end
if Device:isTouchDevice() then
common_settings.keyboard_layout = {
text = _("Keyboard layout"),
text = _("Keyboard"),
sub_item_table = require("ui/elements/menu_keyboard_layout"),
}
common_settings.taps_and_gestures = {

@ -1,11 +1,105 @@
local CheckButton = require("ui/widget/checkbutton")
local FFIUtil = require("ffi/util")
local HorizontalGroup = require("ui/widget/horizontalgroup")
local HorizontalSpan = require("ui/widget/horizontalspan")
local Language = require("ui/language")
local UIManager = require("ui/uimanager")
local VerticalGroup = require("ui/widget/verticalgroup")
local VirtualKeyboard = require("ui/widget/virtualkeyboard")
local _ = require("gettext")
local sub_item_table = {}
local input_dialog, check_button_bold, check_button_border
local sub_item_table = {
{
text = _("Keyboard layout"),
sub_item_table = {},
},
{
text = _("Keyboard font size"),
keep_menu_open = true,
callback = function()
input_dialog = require("ui/widget/inputdialog"):new{
title = _("Keyboard font size"),
input = tostring(G_reader_settings:readSetting("keyboard_key_font_size") or 22),
input_hint = "(16 - 30)",
buttons = {
{
{
text = _("Close"),
callback = function()
UIManager:close(input_dialog)
end,
},
{
text = _("Apply"),
is_enter_default = true,
callback = function()
local font_size = tonumber(input_dialog:getInputText())
if font_size and font_size >= 16 and font_size <= 30 then
G_reader_settings:saveSetting("keyboard_key_font_size", font_size)
G_reader_settings:saveSetting("keyboard_key_bold", check_button_bold.checked)
G_reader_settings:saveSetting("keyboard_key_border", check_button_border.checked)
input_dialog._input_widget:onCloseKeyboard()
input_dialog._input_widget:initKeyboard()
input_dialog:onShowKeyboard()
end
end,
},
},
},
}
-- checkboxes
check_button_bold = CheckButton:new{
text = _("in bold"),
checked = G_reader_settings:isTrue("keyboard_key_bold"),
parent = input_dialog,
max_width = input_dialog._input_widget.width,
callback = function()
if check_button_bold.checked then
check_button_bold:unCheck()
else
check_button_bold:check()
end
end,
}
check_button_border = CheckButton:new{
text = _("with border"),
checked = G_reader_settings:nilOrTrue("keyboard_key_border"),
parent = input_dialog,
max_width = input_dialog._input_widget.width,
callback = function()
if check_button_border.checked then
check_button_border:unCheck()
else
check_button_border:check()
end
end,
}
local checkbox_shift = math.floor((input_dialog.width - input_dialog._input_widget.width) / 2 + 0.5)
local check_buttons = HorizontalGroup:new{
HorizontalSpan:new{width = checkbox_shift},
VerticalGroup:new{
align = "left",
check_button_bold,
check_button_border,
},
}
-- insert check buttons before the regular buttons
local nb_elements = #input_dialog.dialog_frame[1]
table.insert(input_dialog.dialog_frame[1], nb_elements-1, check_buttons)
UIManager:show(input_dialog)
input_dialog:onShowKeyboard()
end,
},
}
for k, _ in FFIUtil.orderedPairs(VirtualKeyboard.lang_to_keyboard_layout) do
table.insert(sub_item_table, {
table.insert(sub_item_table[1].sub_item_table, {
text_func = function()
local text = Language:getLanguageName(k)
if VirtualKeyboard:getKeyboardLayout() == k then

@ -39,7 +39,7 @@ local Language = {
ja = "日本語",
kk = "Қазақ",
ko_KR = "한글",
ru = "Русский язык",
ru = "Русский",
uk = "Українська",
zh = "中文",
zh_CN = "简体中文",

@ -41,13 +41,16 @@ local VirtualKey = InputContainer:new{
width = nil,
height = math.max(Screen:getWidth(), Screen:getHeight())*0.33,
bordersize = Size.border.thin,
focused_bordersize = Size.border.default * 5,
bordersize = 0,
focused_bordersize = Size.border.default,
radius = 0,
face = Font:getFace("infont"),
}
function VirtualKey:init()
local label_font_size = G_reader_settings:readSetting("keyboard_key_font_size") or 22
self.face = Font:getFace("infont", label_font_size)
self.bold = G_reader_settings:isTrue("keyboard_key_bold")
if self.keyboard.symbolmode_keys[self.label] ~= nil then
self.callback = function () self.keyboard:setLayer("Sym") end
self.skiptap = true
@ -83,7 +86,7 @@ function VirtualKey:init()
end
end
self.hold_callback = function()
if util.tableSize(self.key_chars) > 3 then
if util.tableSize(self.key_chars) > 5 then
self.popup = VirtualKeyPopup:new{
parent_key = self,
}
@ -137,7 +140,7 @@ function VirtualKey:init()
}
end
self.swipe_callback = function(ges)
local key_string = self.key_chars[ges.direction]
local key_string = self.key_chars[ges.direction] or self.key
local key_function = self.key_chars[ges.direction.."_func"]
if not key_function and key_string then
@ -168,6 +171,47 @@ function VirtualKey:init()
face = self.face,
bold = self.bold or false,
}
-- Make long labels fit by decreasing font size
local max_width = self.width - 2*self.bordersize - 2*Size.padding.small
while label_widget:getWidth() > max_width do
local new_size = label_widget.face.orig_size - 1
label_widget:free()
if new_size < 8 then break end -- don't go too small
label_widget = TextWidget:new{
text = self.label,
face = Font:getFace(self.face.orig_font, new_size),
bold = self.bold or false,
}
end
end
if self.alt_label then
local OverlapGroup = require("ui/widget/overlapgroup")
local alt_label_widget = TextWidget:new{
text = self.alt_label,
face = Font:getFace(self.face.orig_font, label_font_size - 4),
bold = self.bold or false,
fgcolor = Blitbuffer.COLOR_DARK_GRAY,
padding = 0, -- no additional padding to font line height
}
local key_inner_dimen = Geom:new{
w = self.width - 2*self.bordersize - 2*Size.padding.default,
h = self.height - 2*self.bordersize - 2*Size.padding.small, -- already some padding via line height
}
label_widget = OverlapGroup:new{
CenterContainer:new{
dimen = key_inner_dimen,
label_widget,
},
WidgetContainer:new{
overlap_align = "right",
dimen = Geom:new{
w = alt_label_widget:getSize().w,
h = key_inner_dimen.h,
},
alt_label_widget,
},
}
end
self[1] = FrameContainer:new{
margin = 0,
@ -224,7 +268,7 @@ function VirtualKey:init()
}
end
if (self.keyboard.shiftmode_keys[self.label] ~= nil and self.keyboard.shiftmode) or
(self.keyboard.umlautmode_keys[self.label] ~= nil and self.keyboard.umlautmode) then
(self.keyboard.symbolmode_keys[self.label] ~= nil and self.keyboard.symbolmode) then
self[1].background = Blitbuffer.COLOR_LIGHT_GRAY
end
self.flash_keyboard = G_reader_settings:nilOrTrue("flash_keyboard")
@ -241,8 +285,9 @@ function VirtualKey:genkeyboardLayoutKeyChars()
local key_chars = {
{ label = "🌐",
},
east = { label = "🌐", },
east = { label = "", },
east_func = function ()
UIManager:close(self.popup)
self.keyboard_layout_dialog = KeyboardLayoutDialog:new{
parent = self,
}
@ -586,14 +631,14 @@ function VirtualKeyPopup:init()
local keyboard_frame = FrameContainer:new{
margin = 0,
bordersize = Size.border.default,
background = Blitbuffer.COLOR_WHITE,
background = G_reader_settings:nilOrTrue("keyboard_key_border") and Blitbuffer.COLOR_LIGHT_GRAY or Blitbuffer.COLOR_WHITE,
radius = 0,
padding = parent_key.keyboard.padding,
allow_mirroring = false,
CenterContainer:new{
dimen = Geom:new{
w = parent_key.width*num_columns + 2*Size.border.default + (num_columns)*parent_key.keyboard.key_padding,
h = parent_key.height*num_rows + 2*Size.border.default + num_rows*parent_key.keyboard.key_padding,
w = parent_key.width*num_columns + 2*Size.border.default + (num_columns+1)*parent_key.keyboard.key_padding,
h = parent_key.height*num_rows + 2*Size.border.default + (num_rows+1)*parent_key.keyboard.key_padding,
},
vertical_group,
}
@ -617,17 +662,17 @@ function VirtualKeyPopup:init()
self.key_events.Close = { {"Back"}, doc = "close keyboard" }
end
local offset_x = 2*parent_key.keyboard.padding + 2*parent_key.keyboard.bordersize
local offset_x = 2*keyboard_frame.bordersize + keyboard_frame.padding + parent_key.keyboard.key_padding
if columns[1] then
offset_x = offset_x + parent_key.width + parent_key.keyboard.padding + 2*parent_key.keyboard.bordersize
offset_x = offset_x + parent_key.width + parent_key.keyboard.key_padding
end
local offset_y = parent_key.keyboard.padding + parent_key.keyboard.padding + 2*parent_key.keyboard.bordersize
local offset_y = 2*keyboard_frame.bordersize + keyboard_frame.padding + parent_key.keyboard.key_padding
if rows.extra_key_chars then
offset_y = offset_y + parent_key.height + parent_key.keyboard.padding + 2*parent_key.keyboard.bordersize
offset_y = offset_y + parent_key.height + parent_key.keyboard.key_padding
end
if rows.top_key_chars then
offset_y = offset_y + parent_key.height + parent_key.keyboard.padding + 2*parent_key.keyboard.bordersize
offset_y = offset_y + parent_key.height + parent_key.keyboard.key_padding
end
local position_container = WidgetContainer:new{
@ -684,8 +729,8 @@ local VirtualKeyboard = FocusManager:new{
width = Screen:scaleBySize(600),
height = nil,
bordersize = Size.border.default,
padding = Size.padding.small,
key_padding = Size.padding.default,
padding = 0,
key_padding = Size.padding.small,
lang_to_keyboard_layout = {
ar_AA = "ar_AA_keyboard",
@ -828,14 +873,18 @@ function VirtualKeyboard:addKeys()
local key
local key_chars = self.KEYS[i][j][self.keyboard_layer]
local label
local alt_label
local width_factor
if type(key_chars) == "table" then
key = key_chars[1]
label = key_chars.label
alt_label = key_chars.alt_label
width_factor = key_chars.width
else
key = key_chars
key_chars = nil
end
local width_factor = self.KEYS[i][j].width or 1.0
width_factor = width_factor or self.KEYS[i][j].width or self.KEYS[i].width or 1.0
local key_width = math.floor((base_key_width + self.key_padding) * width_factor)
- self.key_padding
local key_height = base_key_height
@ -845,6 +894,7 @@ function VirtualKeyboard:addKeys()
key_chars = key_chars,
icon = self.KEYS[i][j].icon,
label = label,
alt_label = alt_label,
bold = self.KEYS[i][j].bold,
keyboard = self,
width = key_width,
@ -869,7 +919,7 @@ function VirtualKeyboard:addKeys()
local keyboard_frame = FrameContainer:new{
margin = 0,
bordersize = Size.border.default,
background = Blitbuffer.COLOR_WHITE,
background = G_reader_settings:nilOrTrue("keyboard_key_border") and Blitbuffer.COLOR_LIGHT_GRAY or Blitbuffer.COLOR_WHITE,
radius = 0,
padding = self.padding,
allow_mirroring = false,
@ -897,7 +947,7 @@ function VirtualKeyboard:setLayer(key)
self.umlautmode = not self.umlautmode
end
self:initLayer()
self:_refresh(true)
self:_refresh(false)
end
function VirtualKeyboard:addChar(key)

Loading…
Cancel
Save