Frontlight widget: add left button as close key on hasFewKeys devices (#11376)

Fixes issue #8023
Related to issue #4029

The fix takes exactly the same approach as other PRs like #6195 to add some usability to devices with few hardware keys. The front-light widget can now be closed using the left key on the d-pad.
reviewable/pr11366/r3
Andrei Ignatev 3 months ago committed by GitHub
parent 3b129e2ada
commit 4c503b0f11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -82,7 +82,8 @@ function FrontLightWidget:init()
-- Input
if Device:hasKeys() then
self.key_events.Close = { { Device.input.group.Back } }
local close_keys = Device:hasFewKeys() and { Device.input.group.Back, "Left" } or Device.input.group.Back
self.key_events.Close = { { close_keys } }
end
if Device:isTouchDevice() then
self.ges_events = {

Loading…
Cancel
Save