From f3c0af49c2970a0cdc1739d7c56a9f72604dc4a3 Mon Sep 17 00:00:00 2001 From: David <97603719+Commodore64user@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:34:34 +0100 Subject: [PATCH] Support 'Ctrl' shortcuts on hasKeyboard (#12347) --- frontend/apps/filemanager/filemanagerfilesearcher.lua | 4 ++-- frontend/apps/reader/modules/readerbookmark.lua | 2 +- frontend/apps/reader/modules/readerdictionary.lua | 2 +- frontend/apps/reader/modules/readersearch.lua | 4 ++-- frontend/apps/reader/modules/readertoc.lua | 2 +- frontend/apps/reader/modules/readerwikipedia.lua | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/apps/filemanager/filemanagerfilesearcher.lua b/frontend/apps/filemanager/filemanagerfilesearcher.lua index 626f7b8b0..22c9d4cdd 100644 --- a/frontend/apps/filemanager/filemanagerfilesearcher.lua +++ b/frontend/apps/filemanager/filemanagerfilesearcher.lua @@ -30,8 +30,8 @@ end function FileSearcher:registerKeyEvents() if Device:hasKeyboard() then - self.key_events.ShowFileSearch = { { "Alt", "F" } } - self.key_events.ShowFileSearchBlank = { { "Alt", "Shift", "F" }, event = "ShowFileSearch", args = "" } + self.key_events.ShowFileSearch = { { "Alt", "F" }, { "Ctrl", "F" } } + self.key_events.ShowFileSearchBlank = { { "Alt", "Shift", "F" }, { "Ctrl", "Shift", "F" }, event = "ShowFileSearch", args = "" } end end diff --git a/frontend/apps/reader/modules/readerbookmark.lua b/frontend/apps/reader/modules/readerbookmark.lua index b181858ba..57fc84b0a 100644 --- a/frontend/apps/reader/modules/readerbookmark.lua +++ b/frontend/apps/reader/modules/readerbookmark.lua @@ -64,7 +64,7 @@ function ReaderBookmark:onGesture() end function ReaderBookmark:registerKeyEvents() if Device:hasKeyboard() then - self.key_events.ShowBookmark = { { "B" } } + self.key_events.ShowBookmark = { { "B" }, { "Shift", "Left" } } self.key_events.ToggleBookmark = { { "Shift", "Right" } } elseif Device:hasScreenKB() then self.key_events.ShowBookmark = { { "ScreenKB", "Left" } } diff --git a/frontend/apps/reader/modules/readerdictionary.lua b/frontend/apps/reader/modules/readerdictionary.lua index d4c091b02..377d2b43b 100644 --- a/frontend/apps/reader/modules/readerdictionary.lua +++ b/frontend/apps/reader/modules/readerdictionary.lua @@ -166,7 +166,7 @@ end function ReaderDictionary:registerKeyEvents() if Device:hasKeyboard() then - self.key_events.ShowDictionaryLookup = { { "Alt", "D" } } + self.key_events.ShowDictionaryLookup = { { "Alt", "D" }, { "Ctrl", "D" } } end end diff --git a/frontend/apps/reader/modules/readersearch.lua b/frontend/apps/reader/modules/readersearch.lua index 7661ea98b..63e5d6673 100644 --- a/frontend/apps/reader/modules/readersearch.lua +++ b/frontend/apps/reader/modules/readersearch.lua @@ -85,8 +85,8 @@ SRELL_ERROR_CODES[666] = _("Expression may lead to an extremely long search time function ReaderSearch:registerKeyEvents() if Device:hasKeyboard() then - self.key_events.ShowFulltextSearchInputBlank = { { "Alt", "Shift", "S" }, event = "ShowFulltextSearchInput", args = "" } - self.key_events.ShowFulltextSearchInputRecent = { { "Alt", "S" }, event = "ShowFulltextSearchInput" } + self.key_events.ShowFulltextSearchInputBlank = { { "Alt", "Shift", "S" }, { "Ctrl", "Shift", "S" }, event = "ShowFulltextSearchInput", args = "" } + self.key_events.ShowFulltextSearchInputRecent = { { "Alt", "S" }, { "Ctrl", "S" }, event = "ShowFulltextSearchInput" } end end diff --git a/frontend/apps/reader/modules/readertoc.lua b/frontend/apps/reader/modules/readertoc.lua index 9dc827336..954992d1b 100644 --- a/frontend/apps/reader/modules/readertoc.lua +++ b/frontend/apps/reader/modules/readertoc.lua @@ -63,7 +63,7 @@ function ReaderToc:registerKeyEvents() if Device:hasScreenKB() then self.key_events.ShowToc = { { "ScreenKB", "Up" } } elseif Device:hasKeyboard() then - self.key_events.ShowToc = { { "T" } } + self.key_events.ShowToc = { { "T" }, { "Shift", "Up" } } end end diff --git a/frontend/apps/reader/modules/readerwikipedia.lua b/frontend/apps/reader/modules/readerwikipedia.lua index 6ca76ef37..8023ee7db 100644 --- a/frontend/apps/reader/modules/readerwikipedia.lua +++ b/frontend/apps/reader/modules/readerwikipedia.lua @@ -39,7 +39,7 @@ end function ReaderWikipedia:registerKeyEvents() if Device:hasKeyboard() then - self.key_events.ShowWikipediaLookup = { { "Alt", "W" } } + self.key_events.ShowWikipediaLookup = { { "Alt", "W" }, { "Ctrl", "W" } } end end