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 338 of file hotkey.c.
339{
341
342 WARN(
"DefWndGetHotKey\n");
343
344 while (pHotKey)
345 {
347 {
348
350 }
351
352
353 pHotKey = pHotKey->
pNext;
354 }
355
356 return 0;
357}
static UCHAR IntSwapModHKF(UINT Input)
Referenced by IntDefWindowProc().
◆ DefWndSetHotKey()
Definition at line 365 of file hotkey.c.
366{
371
372 WARN(
"DefWndSetHotKey wParam 0x%x\n",
wParam);
373
374
376 return 0;
377
378
380 {
381 return -1;
382 }
383
385 {
387 while (pHotKey)
388 {
392 {
393 if (pHotKey->
pWnd != pWnd)
394 iRet = 2;
395 break;
396 }
397
398
399 pHotKey = pHotKey->
pNext;
400 }
401 }
402
405 while (pHotKey)
406 {
408 {
409
410 break;
411 }
412
413
414 pLink = &pHotKey->
pNext;
415 pHotKey = pHotKey->
pNext;
416 }
417
419 {
420 if (!pHotKey)
421 {
422
425 return 0;
426
427 pHotKey->
pWnd = pWnd;
431 }
432
433
434
438 }
439 else if (pHotKey)
440 {
441
442 *pLink = pHotKey->
pNext;
444 }
445
446 return iRet;
447}
#define ExAllocatePoolWithTag(hernya, size, tag)
#define ExFreePoolWithTag(_P, _T)
Referenced by IntDefWindowProc().
◆ StartDebugHotKeys()
Definition at line 46 of file hotkey.c.
47{
52 {
54 }
57 TRACE(
"Start up the debugger hotkeys!! If you see this you enabled debugprints. 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 451 of file hotkey.c.
455{
458
459
461 {
463 }
464 else
465 {
466 pHotKeyThread = pWnd->
head.pti;
467 }
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 NtUserSetShellWindowEx(), RawInputThreadMain(), and StartDebugHotKeys().
◆ 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 pLink = &pHotKey->
pNext;
520
521
522 pHotKey = phkNext;
523 }
524 return bRet;
525}
Referenced by StartDebugHotKeys().