mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
Bug Fix: DPad conflict on Kindle Keyboard (#12341)
* fix conflicting panning and content selection * accurate keyboard info message
This commit is contained in:
parent
27e2efcbd2
commit
3450aaba99
@ -21,7 +21,7 @@ end
|
|||||||
function ReaderPanning:onGesture() end
|
function ReaderPanning:onGesture() end
|
||||||
|
|
||||||
function ReaderPanning:registerKeyEvents()
|
function ReaderPanning:registerKeyEvents()
|
||||||
if Device:hasKeyboard() then
|
if Device:hasKeyboard() and Device:hasDPad() and not Device:useDPadAsActionKeys() then
|
||||||
self.key_events = {
|
self.key_events = {
|
||||||
-- these will all generate the same event, just with different arguments
|
-- these will all generate the same event, just with different arguments
|
||||||
MoveUp = {
|
MoveUp = {
|
||||||
|
@ -231,15 +231,21 @@ if Device:hasKeyboard() or Device:hasScreenKB() then
|
|||||||
-- we use same pos. 4 as below so we are always above "keyboard apperance settings"
|
-- we use same pos. 4 as below so we are always above "keyboard apperance settings"
|
||||||
table.insert(sub_item_table, 4, {
|
table.insert(sub_item_table, 4, {
|
||||||
text = _("Show virtual keyboard"),
|
text = _("Show virtual keyboard"),
|
||||||
help_text = _("Enable this setting to always display the virtual keyboard within a text input field. When a field is selected (in focus), you can temporarily toggle the keyboard on/off by pressing 'Shift' + 'Home'."),
|
help_text = _("Enable this setting to always display the virtual keyboard within a text input field. When a field is selected (in focus), you can temporarily toggle the keyboard on/off by pressing 'Shift' (or 'ScreenKB') + 'Home'."),
|
||||||
checked_func = function()
|
checked_func = function()
|
||||||
return G_reader_settings:nilOrTrue("virtual_keyboard_enabled")
|
return G_reader_settings:nilOrTrue("virtual_keyboard_enabled")
|
||||||
end,
|
end,
|
||||||
callback = function()
|
callback = function()
|
||||||
G_reader_settings:flipNilOrTrue("virtual_keyboard_enabled")
|
G_reader_settings:flipNilOrTrue("virtual_keyboard_enabled")
|
||||||
if G_reader_settings:isFalse("virtual_keyboard_enabled") then
|
if G_reader_settings:isFalse("virtual_keyboard_enabled") then
|
||||||
|
local keyboard_infomessage
|
||||||
|
if Device:hasScreenKB() then
|
||||||
|
keyboard_infomessage = _("When a text field is selected (in focus), you can temporarily bring up the virtual keyboard by pressing 'ScreenKB' + 'Home'.")
|
||||||
|
else
|
||||||
|
keyboard_infomessage = _("When a text field is selected (in focus), you can temporarily bring up the virtual keyboard by pressing 'Shift' + 'Home'.")
|
||||||
|
end
|
||||||
UIManager:show(InfoMessage:new{
|
UIManager:show(InfoMessage:new{
|
||||||
text = _("When a text field is selected (in focus), you can temporarily bring up the virtual keyboard by pressing 'Shift' + 'Home'.")
|
text = keyboard_infomessage
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user