From 4c503b0f11f97d56d33776a056b54a457e937078 Mon Sep 17 00:00:00 2001 From: Andrei Ignatev <64772919+a-ignatev@users.noreply.github.com> Date: Tue, 16 Jan 2024 22:17:26 +0100 Subject: [PATCH] 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. --- frontend/ui/widget/frontlightwidget.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/ui/widget/frontlightwidget.lua b/frontend/ui/widget/frontlightwidget.lua index 80e605192..f7964f229 100644 --- a/frontend/ui/widget/frontlightwidget.lua +++ b/frontend/ui/widget/frontlightwidget.lua @@ -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 = {