Go to the source code of this file.
◆ IDHK_F12
◆ IDHK_SHIFTF12
◆ IDHK_SNAP_DOWN
◆ IDHK_SNAP_LEFT
◆ IDHK_SNAP_RIGHT
◆ IDHK_SNAP_UP
◆ IDHK_WINKEY
◆ IDHK_WNDKEY
◆ HOT_KEY
◆ PHOT_KEY
◆ co_UserProcessHotKeys()
Definition at line 191 of file hotkey.c.
192{
198
201 {
202
204 }
205
207
208 if (bIsDown)
209 {
210 if (IsModifier)
211 {
212
215 }
216 else
217 {
218
219 pHotKey =
IsHotKey(fModifiers, wVk);
221 }
222 }
223 else
224 {
225 if (IsModifier)
226 {
227
230 }
231 else
232 {
233
236 }
237 }
238
239 if (pHotKey)
240 {
241 TRACE(
"Hot key pressed (pWnd %p, id %d)\n", pHotKey->
pWnd, pHotKey->
id);
242
243
245 {
246 if (bIsDown)
247 {
249
250 }
251 return DoNotPostMsg;
252 }
253
254
256 {
259 if (pWnd)
260 {
261 TRACE(
"System Hot key Id %d Key %u\n", pHotKey->
id, wVk );
265 }
266 }
267
272 {
274 if (topWnd)
275 {
277 }
279 }
280
282 {
283 TRACE(
"UPTM Hot key Id %d Key %u\n", pHotKey->
id, wVk );
285
287 }
288 else
289 {
290 pWnd = pHotKey->
pWnd;
292 {
295
297 }
298
299 if (pWnd)
300 {
301
303 {
306 }
308 {
309
310 if (bIsDown)
311 {
316 }
317 }
318 else
319 {
320 TRACE(
"UPM Hot key Id %d Key %u\n", pHotKey->
id, wVk );
322 }
323
325 }
326 }
327 }
329}
PUSER_MESSAGE_QUEUE gpqForeground
HWND FASTCALL UserGetForegroundWindow(VOID)
#define UserHMGetHandle(obj)
PWINSTATION_OBJECT InputWindowStation
#define ValidateHwndNoErr(hwnd)
VOID co_IntShellHookNotify(WPARAM Message, WPARAM wParam, LPARAM lParam)
static PHOT_KEY FASTCALL IsHotKey(UINT fsModifiers, WORD wVk)
#define IsWindowHotKey(pHK)
static UINT FASTCALL IntGetModifiers(PBYTE pKeyState)
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
BOOL FASTCALL UserPostThreadMessage(PTHREADINFO pti, UINT Msg, WPARAM wParam, LPARAM lParam)
Referenced by ProcessKeyEvent().
◆ DefWndGetHotKey()
Definition at line 336 of file hotkey.c.
337{
339
340 WARN(
"DefWndGetHotKey\n");
341
342 while (pHotKey)
343 {
345 {
346
348 }
349
350
351 pHotKey = pHotKey->
pNext;
352 }
353
354 return 0;
355}
static UCHAR IntSwapModHKF(UINT Input)
Referenced by IntDefWindowProc().
◆ DefWndSetHotKey()
Definition at line 361 of file hotkey.c.
362{
367
368 WARN(
"DefWndSetHotKey wParam 0x%x\n",
wParam);
369
370
372 return 0;
373
374
376 {
377 return -1;
378 }
379
381 {
383 while (pHotKey)
384 {
388 {
389 if (pHotKey->
pWnd != pWnd)
390 iRet = 2;
391 break;
392 }
393
394
395 pHotKey = pHotKey->
pNext;
396 }
397 }
398
401 while (pHotKey)
402 {
404 {
405
406 break;
407 }
408
409
410 pLink = &pHotKey->
pNext;
411 pHotKey = pHotKey->
pNext;
412 }
413
415 {
416 if (!pHotKey)
417 {
418
421 return 0;
422
423 pHotKey->
pWnd = pWnd;
427 }
428
429
430
434 }
435 else if (pHotKey)
436 {
437
438 *pLink = pHotKey->
pNext;
440 }
441
442 return iRet;
443}
#define ExAllocatePoolWithTag(hernya, size, tag)
#define ExFreePoolWithTag(_P, _T)
Referenced by IntDefWindowProc().
◆ SetDebugHotKeys()
Definition at line 46 of file hotkey.c.
47{
51
56
57 TRACE(
"Debugger hotkeys set up! If you see this you enabled Debug Prints. Congrats!\n");
58}
#define ENHANCED_KEYBOARD(Id)
KEYBOARD_ID KeyboardIdentifier
BOOL FASTCALL UserRegisterHotKey(PWND pWnd, int id, UINT fsModifiers, UINT vk)
BOOL FASTCALL UserUnregisterHotKey(PWND pWnd, int id)
Referenced by RawInputThreadMain().
◆ UnregisterThreadHotKeys()
Definition at line 135 of file hotkey.c.
136{
138
139 while (pHotKey)
140 {
141
142 phkNext = pHotKey->
pNext;
143
144
145 if (pHotKey->
pti == pti)
146 {
147
148 *pLink = phkNext;
150 }
151 else
152 pLink = &pHotKey->
pNext;
153
154
155 pHotKey = phkNext;
156 }
157}
Referenced by ExitThreadCallback().
◆ UnregisterWindowHotKeys()
Definition at line 105 of file hotkey.c.
106{
108
109 while (pHotKey)
110 {
111
112 phkNext = pHotKey->
pNext;
113
114
115 if (pHotKey->
pWnd == pWnd)
116 {
117
118 *pLink = phkNext;
120 }
121 else
122 pLink = &pHotKey->
pNext;
123
124
125 pHotKey = phkNext;
126 }
127}
Referenced by co_UserFreeWindow().
◆ UserRegisterHotKey()
Definition at line 447 of file hotkey.c.
451{
454
455
457 {
459 }
460 else
461 {
462 pHotKeyThread = pWnd->
head.pti;
463 }
464
465
468
469
471 {
473 WARN(
"Hotkey already exists\n");
475 }
476
477
480 {
483 }
484
485 pHotKey->
pti = pHotKeyThread;
486 pHotKey->
pWnd = pWnd;
490
491
494
496}
#define ERROR_NOT_ENOUGH_MEMORY
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
#define ERROR_HOTKEY_ALREADY_REGISTERED
Referenced by NtUserRegisterHotKey(), NtUserSetShellWindowEx(), RawInputThreadMain(), and SetDebugHotKeys().
◆ UserUnregisterHotKey()
Definition at line 499 of file hotkey.c.
500{
503
504 while (pHotKey)
505 {
506
507 phkNext = pHotKey->
pNext;
508
509
510 if (pHotKey->
pWnd == pWnd && pHotKey->
id ==
id)
511 {
512
513 *pLink = phkNext;
515
517 }
518 else
519 {
520
521 pLink = &pHotKey->
pNext;
522 }
523
524
525 pHotKey = phkNext;
526 }
527
528 return bRet;
529}
Referenced by NtUserUnregisterHotKey(), and SetDebugHotKeys().