Changeset 6859
- Timestamp:
- Sep 28, 2001, 4:08:17 PM (24 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
changelog (modified) (1 diff)
-
include/win/hook.h (modified) (2 diffs)
-
include/win/winuser.h (modified) (2 diffs)
-
src/user32/HOOK.CPP (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/changelog
r6856 r6859 1 /* $Id: changelog,v 1.1703 2001-09-28 07:51:55 phaller Exp $ */ 1 /* $Id: changelog,v 1.1704 2001-09-28 14:08:02 phaller Exp $ */ 2 3 2001-09-28: Patrick Haller <patrick.haller@innotek.de> 4 - USER32: o added experimental support for WH_KEYBOARD_LL hook 2 5 3 6 2001-09-28: Sander van Leeuwen <sandervl@xs4all.nl> -
trunk/include/win/hook.h
r2946 r6859 1 /* $Id: hook.h,v 1. 3 2000-02-29 19:09:25 sandervlExp $ */1 /* $Id: hook.h,v 1.4 2001-09-28 14:06:39 phaller Exp $ */ 2 2 3 3 /* … … 30 30 31 31 extern BOOL ProcessKbdHook(LPMSG msg, BOOL remove ); 32 extern BOOL ProcessKbdHookLL(LPMSG msg, BOOL remove ); 32 33 33 34 #endif /* __WINE_HOOK_H */ -
trunk/include/win/winuser.h
r6858 r6859 82 82 INT code; 83 83 } DEBUGHOOKINFO, *LPDEBUGHOOKINFO; 84 85 /* 86 * Low level hook flags 87 */ 88 #define LLKHF_EXTENDED 0x00000001 89 #define LLKHF_INJECTED 0x00000010 90 #define LLKHF_ALTDOWN 0x00000020 91 #define LLKHF_UP 0x00000080 92 93 #define LLMHF_INJECTED 0x00000001 94 95 /* 96 * Structure used by WH_KEYBOARD_LL 97 */ 98 typedef struct tagKBDLLHOOKSTRUCT { 99 DWORD vkCode; 100 DWORD scanCode; 101 DWORD flags; 102 DWORD time; 103 DWORD dwExtraInfo; 104 } KBDLLHOOKSTRUCT, *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT; 105 106 /* 107 * Structure used by WH_MOUSE_LL 108 */ 109 typedef struct tagMSLLHOOKSTRUCT { 110 POINT pt; 111 DWORD mouseData; 112 DWORD flags; 113 DWORD time; 114 DWORD dwExtraInfo; 115 } MSLLHOOKSTRUCT, *LPMSLLHOOKSTRUCT, *PMSLLHOOKSTRUCT; 116 84 117 85 118 #define HKL_PREV 0 … … 234 267 #define WPF_SETMINPOSITION 0x0001 235 268 #define WPF_RESTORETOMAXIMIZED 0x0002 269 236 270 237 271 /***** Dialogs *****/ -
trunk/src/user32/HOOK.CPP
r6762 r6859 1 /* $Id: HOOK.CPP,v 1.2 3 2001-09-19 15:39:47 sandervlExp $ */1 /* $Id: HOOK.CPP,v 1.24 2001-09-28 14:08:17 phaller Exp $ */ 2 2 3 3 /* … … 805 805 ? TRUE : FALSE); 806 806 } 807 808 809 810 /*** 811 * ProcessKbdHookLL 812 * this is a low-level version of the keyboard hook 813 * present under NT/2000/XP. 814 * It is supposed to be called for any keyboard event of the 815 * system-input queue AFAIK. 816 */ 817 BOOL ProcessKbdHookLL(LPMSG msg, BOOL remove ) 818 { 819 // @@@PH 820 // format KBDLLHOOKSTRUCT and pass it in as msg->lParam 821 KBDLLHOOKSTRUCT kbhs; 822 823 // check if alt is currently pressed 824 BOOL fAltDown = GetKeyState(VK_LMENU); 825 826 kbhs.vkCode = msg->wParam; 827 kbhs.scanCode = ( (msg->lParam & 0x00ff0000) >> 16); 828 kbhs.flags = ( (msg->lParam & (1 << 24)) ? LLKHF_EXTENDED : 0 ) | 829 // LLKHF_INJECTED currently not supported (SendInput) 830 fAltDown ? LLKHF_ALTDOWN : 0 | 831 ( (msg->lParam & (1 << 31)) ? LLKHF_UP : 0); 832 kbhs.time = msg->time; 833 kbhs.dwExtraInfo = 0; // @@@PH not supported? 834 835 return (HOOK_CallHooksA(WH_KEYBOARD_LL, 836 remove ? HC_ACTION : HC_NOREMOVE, 837 msg->message, 838 (LPARAM)&kbhs ) 839 ? TRUE : FALSE); 840 }
Note:
See TracChangeset
for help on using the changeset viewer.
