mirror of
https://github.com/koreader/koreader
synced 2024-11-13 19:11:25 +00:00
17e437dbd0
Fixes <https://github.com/koreader/koreader/issues/3998>. This isn't quite what I want but I've been letting this slip for too long due to fancier keyboard interaction concepts.
20 lines
579 B
Lua
20 lines
579 B
Lua
local Language = require("ui/language")
|
|
local VirtualKeyboard = require("ui/widget/virtualkeyboard")
|
|
local orderedPairs = require("ffi/util").orderedPairs
|
|
|
|
local sub_item_table = {}
|
|
|
|
for k, _ in orderedPairs(VirtualKeyboard.lang_to_keyboard_layout) do
|
|
table.insert(sub_item_table, {
|
|
text = Language:getLanguageName(k),
|
|
checked_func = function()
|
|
return VirtualKeyboard:getKeyboardLayout() == k
|
|
end,
|
|
callback = function()
|
|
G_reader_settings:saveSetting("keyboard_layout", k)
|
|
end,
|
|
})
|
|
end
|
|
|
|
return sub_item_table
|