Menu button support for dictquicklookup, sortwidget, keyboard settings for NT (#11933)

Menu key support for some widgets. would have closed #11783 and #6463 (cumulative with @comphilip's fixes)

It fixes a problem where some virtual keys were not available for non-touch users. closes #11862

Also, adds keyboard settings to non-touch devices. closes #11934
This commit is contained in:
SomeGuy
2024-05-31 21:33:04 +01:00
committed by GitHub
parent 2f0e456a42
commit c429ac8c3f
3 changed files with 20 additions and 4 deletions

View File

@@ -153,6 +153,7 @@ function SortWidget:init()
self.key_events.Close = { { Device.input.group.Back } }
self.key_events.NextPage = { { Device.input.group.PgFwd } }
self.key_events.PrevPage = { { Device.input.group.PgBack } }
self.key_events.ShowWidgetMenu = { { "Menu" } }
end
if Device:isTouchDevice() then
self.ges_events.Swipe = {
@@ -273,6 +274,11 @@ function SortWidget:init()
}
table.insert(self.layout, {
self.footer_cancel,
self.footer_first_up,
self.footer_left,
self.footer_page,
self.footer_right,
self.footer_last_down,
self.footer_ok,
})
local bottom_line = LineWidget:new{
@@ -475,6 +481,10 @@ function SortWidget:onSwipe(arg, ges_ev)
end
end
function SortWidget:onShowWidgetMenu()
self:showMenu()
end
function SortWidget:showMenu()
local dialog
local buttons = {