mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[KBSWITCH][NTUSER] Revert Shift+Alt handling
The current Shift+Alt handling is buggy. The keyboard won't work frequently. It dislikes system-side Alt (VK_MENU) key handling. It seems like Shift+Alt handling should be in kernel. CORE-10667
This commit is contained in:
parent
efe25648a5
commit
8222c0e6d8
2 changed files with 1 additions and 34 deletions
|
@ -16,7 +16,6 @@
|
|||
PKBSWITCHSETHOOKS KbSwitchSetHooks = NULL;
|
||||
PKBSWITCHDELETEHOOKS KbSwitchDeleteHooks = NULL;
|
||||
UINT ShellHookMessage = 0;
|
||||
DWORD dwAltShiftHotKeyId = 0, dwShiftAltHotKeyId = 0;
|
||||
|
||||
HINSTANCE hInst;
|
||||
HANDLE hProcessHeap;
|
||||
|
@ -451,25 +450,6 @@ UpdateLanguageDisplayCurrent(HWND hwnd, WPARAM wParam)
|
|||
return UpdateLanguageDisplay(hwnd, hKL);
|
||||
}
|
||||
|
||||
VOID DoRegisterAltShiftHotKeys(HWND hwnd)
|
||||
{
|
||||
dwAltShiftHotKeyId = GlobalAddAtom(TEXT("ReactOS Alt+Shift"));
|
||||
dwShiftAltHotKeyId = GlobalAddAtom(TEXT("ReactOS Shift+Alt"));
|
||||
|
||||
RegisterHotKey(hwnd, dwAltShiftHotKeyId, MOD_ALT | MOD_SHIFT, VK_SHIFT);
|
||||
RegisterHotKey(hwnd, dwShiftAltHotKeyId, MOD_ALT | MOD_SHIFT, VK_MENU);
|
||||
}
|
||||
|
||||
VOID DoUnregisterAltShiftHotKeys(HWND hwnd)
|
||||
{
|
||||
UnregisterHotKey(hwnd, dwAltShiftHotKeyId);
|
||||
UnregisterHotKey(hwnd, dwShiftAltHotKeyId);
|
||||
|
||||
GlobalDeleteAtom(dwAltShiftHotKeyId);
|
||||
GlobalDeleteAtom(dwShiftAltHotKeyId);
|
||||
dwAltShiftHotKeyId = dwShiftAltHotKeyId = 0;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK
|
||||
WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -489,8 +469,6 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
ActivateLayout(hwnd, ulCurrentLayoutNum);
|
||||
s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));
|
||||
|
||||
DoRegisterAltShiftHotKeys(hwnd);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -499,14 +477,6 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
|
|||
return UpdateLanguageDisplay(hwnd, (HKL)lParam);
|
||||
}
|
||||
|
||||
case WM_HOTKEY:
|
||||
{
|
||||
if (wParam != dwAltShiftHotKeyId && wParam != dwShiftAltHotKeyId)
|
||||
break;
|
||||
|
||||
/* FALL THROUGH */
|
||||
}
|
||||
|
||||
case WM_LOAD_LAYOUT:
|
||||
{
|
||||
ULONG uNextNum = GetNextLayout();
|
||||
|
@ -599,7 +569,6 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
case WM_DESTROY:
|
||||
{
|
||||
DoUnregisterAltShiftHotKeys(hwnd);
|
||||
DeleteHooks();
|
||||
DestroyMenu(s_hMenu);
|
||||
DeleteTrayIcon(hwnd);
|
||||
|
|
|
@ -211,9 +211,7 @@ co_UserProcessHotKeys(WORD wVk, BOOL bIsDown)
|
|||
if (IsModifier)
|
||||
{
|
||||
/* Modifier key up -- modifier-only keys are triggered here */
|
||||
pHotKey = IsHotKey(gfsModOnlyCandidate, wVk);
|
||||
if (!pHotKey)
|
||||
pHotKey = IsHotKey(gfsModOnlyCandidate, 0);
|
||||
pHotKey = IsHotKey(gfsModOnlyCandidate, 0);
|
||||
gfsModOnlyCandidate = 0;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue