Added new option "Enable accelerators"

It will control whether keyboard accelerators are used in start menu.

Disabling it can be helpful for people that tend to hit some accelerator by mistake.

Fixes #447
This commit is contained in:
ge0rdi
2022-12-19 13:13:35 +01:00
parent fad20ba4c7
commit a7b6a80799
4 changed files with 12 additions and 1 deletions
+7 -1
View File
@@ -5115,6 +5115,9 @@ void CMenuContainer::UpdateSearchResults( bool bForceShowAll )
// Turn on the keyboard cues from now on. This is done when a keyboard action is detected
void CMenuContainer::ShowKeyboardCues( void )
{
if (!GetSettingBool(L"EnableAccelerators"))
return;
if (!s_bKeyboardCues)
{
s_bKeyboardCues=true;
@@ -6109,6 +6112,9 @@ LRESULT CMenuContainer::OnSysKeyDown( UINT uMsg, WPARAM wParam, LPARAM lParam, B
LRESULT CMenuContainer::OnChar( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled )
{
if (!GetSettingBool(L"EnableAccelerators"))
return TRUE;
if (wParam>=0xD800 && wParam<=0xDBFF)
return TRUE; // don't support supplementary characters
@@ -8070,7 +8076,7 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr
s_bNoDragDrop=!GetSettingBool(L"EnableDragDrop");
s_bNoContextMenu=!GetSettingBool(L"EnableContextMenu");
s_bKeyboardCues=bKeyboard;
s_bKeyboardCues=bKeyboard&&GetSettingBool(L"EnableAccelerators");
s_RecentPrograms=(TRecentPrograms)GetSettingInt(L"RecentPrograms");
if (s_RecentPrograms!=RECENT_PROGRAMS_NONE)
LoadMRUShortcuts();