Changeset 6859


Ignore:
Timestamp:
Sep 28, 2001, 4:08:17 PM (24 years ago)
Author:
phaller
Message:

.

Location:
trunk
Files:
4 edited

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
    25
    36 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 sandervl Exp $ */
     1/* $Id: hook.h,v 1.4 2001-09-28 14:06:39 phaller Exp $ */
    22
    33/*
     
    3030
    3131extern BOOL ProcessKbdHook(LPMSG msg, BOOL remove );
     32extern BOOL ProcessKbdHookLL(LPMSG msg, BOOL remove );
    3233
    3334#endif  /* __WINE_HOOK_H */
  • trunk/include/win/winuser.h

    r6858 r6859  
    8282    INT       code;
    8383} 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 */
     98typedef 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 */
     109typedef struct tagMSLLHOOKSTRUCT {
     110    POINT   pt;
     111    DWORD   mouseData;
     112    DWORD   flags;
     113    DWORD   time;
     114    DWORD   dwExtraInfo;
     115} MSLLHOOKSTRUCT, *LPMSLLHOOKSTRUCT, *PMSLLHOOKSTRUCT;
     116
    84117
    85118#define HKL_PREV   0
     
    234267#define WPF_SETMINPOSITION      0x0001
    235268#define WPF_RESTORETOMAXIMIZED  0x0002
     269
    236270
    237271/***** Dialogs *****/
  • trunk/src/user32/HOOK.CPP

    r6762 r6859  
    1 /* $Id: HOOK.CPP,v 1.23 2001-09-19 15:39:47 sandervl Exp $ */
     1/* $Id: HOOK.CPP,v 1.24 2001-09-28 14:08:17 phaller Exp $ */
    22
    33/*
     
    805805                             ? TRUE : FALSE);
    806806}
     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 */
     817BOOL 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.