Global long press on K4, 'ScreenKB' + 'Press' (#11872)

discussed #11834
This commit is contained in:
SomeGuy
2024-05-21 22:48:54 +01:00
committed by GitHub
parent 5b18c30336
commit 3f64ecfd28
2 changed files with 6 additions and 1 deletions

View File

@@ -965,7 +965,9 @@ function Menu:init()
self.key_events.PrevPage = { { Input.group.PgBack } }
end
if Device:hasDPad() then
if Device:hasFiveWay() and not Device:hasKeyboard() then
self.key_events.Hold = { { "ScreenKB", "Press" }, event = "Hold" }
elseif Device:hasDPad() then
-- we won't catch presses to "Right", leave that to MenuItem.
self.key_events.FocusRight = nil
-- shortcut icon is not needed for touch device

View File

@@ -515,6 +515,9 @@ function TouchMenu:init()
if Device:hasFewKeys() then
self.key_events.Back = { { "Left" } }
end
if Device:hasFiveWay() and not Device:hasKeyboard() then
self.key_events.Hold = { { "ScreenKB", "Press" }, event = "Hold" }
end
self.key_events.NextPage = { { Input.group.PgFwd } }
self.key_events.PrevPage = { { Input.group.PgBack } }