Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UX] Allow keyboard layout selection
Fixes <#3998>. This is an unpolished quickie but I've been letting this slip for too long due to fancier keyboard interaction concepts.
- Loading branch information
Showing
4 changed files
with
37 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
local VirtualKeyboard = require("ui/widget/virtualkeyboard") | ||
|
||
local sub_item_table = {} | ||
|
||
for k, _ in pairs(VirtualKeyboard.lang_to_keyboard_layout) do | ||
table.insert(sub_item_table, { | ||
text = k, | ||
checked_func = function() | ||
return VirtualKeyboard:getKeyboardLayout() == k | ||
end, | ||
callback = function() | ||
G_reader_settings:saveSetting("keyboard_layout", k) | ||
end, | ||
}) | ||
end | ||
|
||
return sub_item_table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,7 @@ local order = { | |
"status_bar", | ||
}, | ||
device = { | ||
"keyboard_layout", | ||
"time", | ||
"battery", | ||
"autosuspend", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters