mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-06-14 11:26:38 +10:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user