Go to the source code of this file.
◆ IDHK_F12
◆ IDHK_REACTOS
◆ IDHK_SHIFTF12
◆ IDHK_SNAP_DOWN
◆ IDHK_SNAP_LEFT
◆ IDHK_SNAP_RIGHT
◆ IDHK_SNAP_UP
◆ IDHK_WINKEY
◆ HOT_KEY
◆ PHOT_KEY
◆ co_UserProcessHotKeys()
Definition at line 177 of file hotkey.c.
178{
184
187 {
188
190 }
191
193
194 if (bIsDown)
195 {
196 if (IsModifier)
197 {
198
201 }
202 else
203 {
204
205 pHotKey =
IsHotKey(fModifiers, wVk);
207 }
208 }
209 else
210 {
211 if (IsModifier)
212 {
213
216 }
217 else
218 {
219
222 }
223 }
224
225 if (pHotKey)
226 {
227 TRACE(
"Hot key pressed (pWnd %p, id %d)\n", pHotKey->
pWnd, pHotKey->
id);
228
229
231 {
232 if (bIsDown)
233 {
235
236 }
237 return DoNotPostMsg;
238 }
239
240
242 {
245 if (pWnd)
246 {
247 TRACE(
"System Hot key Id %d Key %u\n", pHotKey->
id, wVk );
251 }
252 }
253
258 {
260 if (topWnd)
261 {
263 }
265 }
266
268 {
269 TRACE(
"UPTM Hot key Id %d Key %u\n", pHotKey->
id, wVk );
271
273 }
274 else
275 {
276 pWnd = pHotKey->
pWnd;
278 {
281
283 }
284
285 if (pWnd)
286 {
287
289 {
292 }
293 else
294 {
295 TRACE(
"UPM Hot key Id %d Key %u\n", pHotKey->
id, wVk );
297 }
298
300 }
301 }
302 }
304}
#define ValidateHwndNoErr(hwnd)
PUSER_MESSAGE_QUEUE gpqForeground
HWND FASTCALL UserGetForegroundWindow(VOID)
#define UserHMGetHandle(obj)
PWINSTATION_OBJECT InputWindowStation
VOID co_IntShellHookNotify(WPARAM Message, WPARAM wParam, LPARAM lParam)
static PHOT_KEY FASTCALL IsHotKey(UINT fsModifiers, WORD wVk)
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 313 of file hotkey.c.
314{
316
317 WARN(
"DefWndGetHotKey\n");
318
319 while (pHotKey)
320 {
322 {
323
325 }
326
327
328 pHotKey = pHotKey->
pNext;
329 }
330
331 return 0;
332}
Referenced by IntDefWindowProc().
◆ DefWndSetHotKey()
Definition at line 340 of file hotkey.c.
341{
345
346 WARN(
"DefWndSetHotKey wParam 0x%x\n",
wParam);
347
348
350 return 0;
351
352
356 {
357 return -1;
358 }
359
362
364 {
366 while (pHotKey)
367 {
371 {
372 if (pHotKey->
pWnd != pWnd)
373 iRet = 2;
374 break;
375 }
376
377
378 pHotKey = pHotKey->
pNext;
379 }
380 }
381
384 while (pHotKey)
385 {
386 if (pHotKey->
pWnd == pWnd &&
388 {
389
390 break;
391 }
392
393
394 pLink = &pHotKey->
pNext;
395 pHotKey = pHotKey->
pNext;
396 }
397
399 {
400 if (!pHotKey)
401 {
402
405 return 0;
406
407 pHotKey->
pWnd = pWnd;
411 }
412
413
414
418 }
419 else if (pHotKey)
420 {
421
422 *pLink = pHotKey->
pNext;
424 }
425
426 return iRet;
427}
#define ExAllocatePoolWithTag(hernya, size, tag)
#define ExFreePoolWithTag(_P, _T)
Referenced by IntDefWindowProc().
◆ StartDebugHotKeys()
Definition at line 44 of file hotkey.c.
45{
50 {
52 }
55 TRACE(
"Start up the debugger hotkeys!! If you see this you enabled debugprints. Congrats!\n");
56}
#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 121 of file hotkey.c.
122{
124
125 while (pHotKey)
126 {
127
128 phkNext = pHotKey->
pNext;
129
130
131 if (pHotKey->
pti == pti)
132 {
133
134 *pLink = phkNext;
136 }
137 else
138 pLink = &pHotKey->
pNext;
139
140
141 pHotKey = phkNext;
142 }
143}
Referenced by ExitThreadCallback().
◆ UnregisterWindowHotKeys()
Definition at line 91 of file hotkey.c.
92{
94
95 while (pHotKey)
96 {
97
98 phkNext = pHotKey->
pNext;
99
100
101 if (pHotKey->
pWnd == pWnd)
102 {
103
104 *pLink = phkNext;
106 }
107 else
108 pLink = &pHotKey->
pNext;
109
110
111 pHotKey = phkNext;
112 }
113}
Referenced by co_UserFreeWindow().
◆ UserRegisterHotKey()
Definition at line 431 of file hotkey.c.
435{
438
439
441 {
443 }
444 else
445 {
446 pHotKeyThread = pWnd->
head.pti;
447 }
448
449
451 {
453 WARN(
"Hotkey already exists\n");
455 }
456
457
460 {
463 }
464
465 pHotKey->
pti = pHotKeyThread;
466 pHotKey->
pWnd = pWnd;
470
471
474
476}
#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 479 of file hotkey.c.
480{
483
484 while (pHotKey)
485 {
486
487 phkNext = pHotKey->
pNext;
488
489
490 if (pHotKey->
pWnd == pWnd && pHotKey->
id ==
id)
491 {
492
493 *pLink = phkNext;
495
497 }
498 else
499 pLink = &pHotKey->
pNext;
500
501
502 pHotKey = phkNext;
503 }
504 return bRet;
505}
Referenced by StartDebugHotKeys().