55 TRACE(
"Start up the debugger hotkeys!! If you see this you eneabled debugprints. Congrats!\n");
98 phkNext = pHotKey->
pNext;
101 if (pHotKey->
pWnd == pWnd)
108 pLink = &pHotKey->
pNext;
128 phkNext = pHotKey->
pNext;
131 if (pHotKey->
pti == pti)
138 pLink = &pHotKey->
pNext;
165 pHotKey = pHotKey->
pNext;
205 pHotKey =
IsHotKey(fModifiers, wVk);
227 TRACE(
"Hot key pressed (pWnd %p, id %d)\n", pHotKey->
pWnd, pHotKey->
id);
247 TRACE(
"System Hot key Id %d Key %u\n", pHotKey->
id, wVk );
269 TRACE(
"UPTM Hot key Id %d Key %u\n", pHotKey->
id, wVk );
276 pWnd = pHotKey->
pWnd;
295 TRACE(
"UPM Hot key Id %d Key %u\n", pHotKey->
id, wVk );
317 WARN(
"DefWndGetHotKey\n");
328 pHotKey = pHotKey->
pNext;
346 WARN(
"DefWndSetHotKey wParam 0x%x\n",
wParam);
372 if (pHotKey->
pWnd != pWnd)
378 pHotKey = pHotKey->
pNext;
386 if (pHotKey->
pWnd == pWnd &&
394 pLink = &pHotKey->
pNext;
395 pHotKey = pHotKey->
pNext;
407 pHotKey->
pWnd = pWnd;
422 *pLink = pHotKey->
pNext;
446 pHotKeyThread = pWnd->
head.pti;
453 WARN(
"Hotkey already exists\n");
465 pHotKey->
pti = pHotKeyThread;
466 pHotKey->
pWnd = pWnd;
487 phkNext = pHotKey->
pNext;
490 if (pHotKey->
pWnd == pWnd && pHotKey->
id ==
id)
499 pLink = &pHotKey->
pNext;
522 TRACE(
"Enter NtUserRegisterHotKey\n");
526 WARN(
"Invalid modifiers: %x\n", fsModifiers);
544 pHotKeyThread = pWnd->
head.pti;
550 WARN(
"Must be from the same Thread.\n");
559 WARN(
"Hotkey already exists\n");
571 pHotKey->
pti = pHotKeyThread;
572 pHotKey->
pWnd = pWnd;
584 TRACE(
"Leave NtUserRegisterHotKey, ret=%i\n", bRet);
597 TRACE(
"Enter NtUserUnregisterHotKey\n");
607 phkNext = pHotKey->
pNext;
610 if (pHotKey->
pWnd == pWnd && pHotKey->
id ==
id)
619 pLink = &pHotKey->
pNext;
626 TRACE(
"Leave NtUserUnregisterHotKey, ret=%i\n", bRet);
PUSER_MESSAGE_QUEUE gpqForeground
static UINT FASTCALL IntGetModifiers(PBYTE pKeyState)
#define ENHANCED_KEYBOARD(Id)
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
DBG_DEFAULT_CHANNEL(UserHotkey)
BOOL NTAPI co_UserProcessHotKeys(WORD wVk, BOOL bIsDown)
PWINSTATION_OBJECT InputWindowStation
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
#define ERROR_NOT_ENOUGH_MEMORY
VOID FASTCALL StartDebugHotKeys(VOID)
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
BOOL FASTCALL UserPostThreadMessage(PTHREADINFO pti, UINT Msg, WPARAM wParam, LPARAM lParam)
#define ERROR_WINDOW_OF_OTHER_THREAD
PWND FASTCALL UserGetWindowObject(HWND hWnd)
HWND FASTCALL UserGetForegroundWindow(VOID)
#define ERROR_HOTKEY_ALREADY_REGISTERED
VOID FASTCALL UserEnterExclusive(VOID)
#define UserHMGetHandle(obj)
static PHOT_KEY FASTCALL IsHotKey(UINT fsModifiers, WORD wVk)
BOOL APIENTRY NtUserRegisterHotKey(HWND hWnd, int id, UINT fsModifiers, UINT vk)
#define ValidateHwndNoErr(hwnd)
UINT FASTCALL DefWndGetHotKey(PWND pWnd)
#define ExAllocatePoolWithTag(hernya, size, tag)
KEYBOARD_ID KeyboardIdentifier
BOOL APIENTRY NtUserUnregisterHotKey(HWND hWnd, int id)
VOID FASTCALL UnregisterThreadHotKeys(PTHREADINFO pti)
BOOL FASTCALL UserRegisterHotKey(PWND pWnd, int id, UINT fsModifiers, UINT vk)
VOID FASTCALL UserLeave(VOID)
INT FASTCALL DefWndSetHotKey(PWND pWnd, WPARAM wParam)
VOID co_IntShellHookNotify(WPARAM Message, WPARAM wParam, LPARAM lParam)
char * cleanup(char *str)
BOOL FASTCALL UserUnregisterHotKey(PWND pWnd, int id)
#define ExFreePoolWithTag(_P, _T)
#define ERROR_INVALID_FLAGS
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
VOID FASTCALL UnregisterWindowHotKeys(PWND pWnd)