mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[UX] Keyboard: add @ and A diacritics (#4889)
Also rename std to en_keyboard.
This commit is contained in:
@@ -1,27 +1,9 @@
|
||||
local _E_ = {
|
||||
"E",
|
||||
north = "Ë",
|
||||
northeast = "É",
|
||||
northwest = "È",
|
||||
east = "Ê",
|
||||
west = "Ẽ",
|
||||
south = "Ę",
|
||||
southeast = "€",
|
||||
southwest = "Ė",
|
||||
"Ē",
|
||||
}
|
||||
local _e_ = {
|
||||
"e",
|
||||
north = "ë",
|
||||
northeast = "é",
|
||||
northwest = "è",
|
||||
east = "ê",
|
||||
west = "ẽ",
|
||||
south = "ę",
|
||||
southeast = "€",
|
||||
southwest = "ė",
|
||||
"ē",
|
||||
}
|
||||
local en_popup = require("ui/data/keyboardlayouts/keypopup/en_popup")
|
||||
local _at = en_popup._at
|
||||
local _A_ = en_popup._A_
|
||||
local _a_ = en_popup._a_
|
||||
local _E_ = en_popup._E_
|
||||
local _e_ = en_popup._e_
|
||||
|
||||
return {
|
||||
shiftmode_keys = {["Shift"] = true},
|
||||
@@ -33,7 +15,7 @@ return {
|
||||
{ -- 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
{ "Q", "q", "„", "0", "Й", "й", "?", "!", "Å", "å", "1", "ª", },
|
||||
{ "W", "w", "!", "1", "Ц", "ц", "(", "1", "Ä", "ä", "2", "º", },
|
||||
{ _E_, _e_, "@", "2", "У", "у", ")", "2", "Ö", "ö", "3", "¡", },
|
||||
{ _E_, _e_, _at, "2", "У", "у", ")", "2", "Ö", "ö", "3", "¡", },
|
||||
{ "R", "r", "#", "3", "К", "к", "~", "3", "ß", "ß", "4", "¿", },
|
||||
{ "T", "t", "+", "=", "Е", "е", "Ә", "ә", "À", "à", "5", "¼", },
|
||||
{ "Y", "y", "€", "(", "Н", "н", "І", "і", "Â", "â", "6", "½", },
|
||||
@@ -44,7 +26,7 @@ return {
|
||||
},
|
||||
-- second row
|
||||
{ -- 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
{ "A", "a", "…", "@", "Ф", "ф", "*", "0", "Ê", "ê", "Ş", "ş", },
|
||||
{ _A_, _a_, "…", _at, "Ф", "ф", "*", "0", "Ê", "ê", "Ş", "ş", },
|
||||
{ "S", "s", "$", "4", "Ы", "ы", "+", "4", "Ë", "ë", "İ", "ı", },
|
||||
{ "D", "d", "%", "5", "В", "в", "-", "5", "Î", "î", "Ğ", "ğ", },
|
||||
{ "F", "f", "^", "6", "А", "а", "=", "6", "Ï", "ï", "Ć", "ć", },
|
||||
60
frontend/ui/data/keyboardlayouts/keypopup/en_popup.lua
Normal file
60
frontend/ui/data/keyboardlayouts/keypopup/en_popup.lua
Normal file
@@ -0,0 +1,60 @@
|
||||
return {
|
||||
_at = {
|
||||
"@",
|
||||
north = "Ⓒ",
|
||||
northeast = "™",
|
||||
northwest = "Ⓡ",
|
||||
},
|
||||
_A_ = {
|
||||
"A",
|
||||
north = "Ä",
|
||||
northeast = "Á",
|
||||
northwest = "À",
|
||||
east = "Â",
|
||||
west = "Ã",
|
||||
south = "Ą",
|
||||
southeast = "Æ",
|
||||
southwest = "Å",
|
||||
"Ā",
|
||||
"Ǎ",
|
||||
},
|
||||
_a_ = {
|
||||
"a",
|
||||
north = "ä",
|
||||
northeast = "á",
|
||||
northwest = "à",
|
||||
east = "â",
|
||||
west = "ã",
|
||||
south = "ą",
|
||||
southeast = "æ",
|
||||
southwest = "å",
|
||||
"ā",
|
||||
"ǎ",
|
||||
},
|
||||
_E_ = {
|
||||
"E",
|
||||
north = "Ë",
|
||||
northeast = "É",
|
||||
northwest = "È",
|
||||
east = "Ê",
|
||||
west = "Ẽ",
|
||||
south = "Ę",
|
||||
southeast = "€",
|
||||
southwest = "Ė",
|
||||
"Ē",
|
||||
"Ě",
|
||||
},
|
||||
_e_ = {
|
||||
"e",
|
||||
north = "ë",
|
||||
northeast = "é",
|
||||
northwest = "è",
|
||||
east = "ê",
|
||||
west = "ẽ",
|
||||
south = "ę",
|
||||
southeast = "€",
|
||||
southwest = "ė",
|
||||
"ē",
|
||||
"ě",
|
||||
},
|
||||
}
|
||||
@@ -437,6 +437,7 @@ local VirtualKeyboard = FocusManager:new{
|
||||
|
||||
local lang_to_keyboard_layout = {
|
||||
el = "el_keyboard",
|
||||
en = "en_keyboard",
|
||||
es = "es_keyboard",
|
||||
fr = "fr_keyboard",
|
||||
ja = "ja_keyboard",
|
||||
@@ -445,8 +446,9 @@ local lang_to_keyboard_layout = {
|
||||
}
|
||||
|
||||
function VirtualKeyboard:init()
|
||||
local lang = G_reader_settings:readSetting("language")
|
||||
local keyboard_layout = lang_to_keyboard_layout[lang] or "std"
|
||||
local lang = G_reader_settings:readSetting("language") or "en"
|
||||
if lang == "C" then lang = "en" end
|
||||
local keyboard_layout = lang_to_keyboard_layout[lang]
|
||||
local keyboard = require("ui/data/keyboardlayouts/" .. keyboard_layout)
|
||||
self.KEYS = keyboard.keys
|
||||
self.shiftmode_keys = keyboard.shiftmode_keys
|
||||
|
||||
Reference in New Issue
Block a user