2 * KEYBOARD driver interface
4 * Copyright 1998 Ulrich Weigand
7 #ifndef __WINE_KEYBOARD_H
8 #define __WINE_KEYBOARD_H
14 typedef struct _KBINFO
16 BYTE Begin_First_Range
;
18 BYTE Begin_Second_Range
;
19 BYTE End_Second_Range
;
24 typedef VOID (CALLBACK
*LPKEYBD_EVENT_PROC
)(BYTE
,BYTE
,DWORD
,DWORD
);
26 WORD WINAPI
KEYBOARD_Inquire(LPKBINFO kbInfo
);
27 VOID WINAPI
KEYBOARD_Enable(LPKEYBD_EVENT_PROC lpKeybEventProc
,
29 VOID WINAPI
KEYBOARD_Disable(VOID
);
33 #define WINE_KEYBOARD_CONFIG_AUTO_REPEAT 0x00000001
34 typedef struct tagKEYBOARD_CONFIG
{
38 typedef struct tagKEYBOARD_DRIVER
{
40 WORD (*pVkKeyScan
)(CHAR
);
41 UINT16 (*pMapVirtualKey
)(UINT16
, UINT16
);
42 INT16 (*pGetKeyNameText
)(LONG
, LPSTR
, INT16
);
43 INT16 (*pToAscii
)(UINT16
, UINT16
, LPBYTE
, LPVOID
, UINT16
);
44 BOOL (*pGetBeepActive
)(void);
45 void (*pSetBeepActive
)(BOOL
);
47 BOOL (*pGetDIState
)(DWORD
, LPVOID
);
48 BOOL (*pGetDIData
)(BYTE
*, DWORD
, LPDIDEVICEOBJECTDATA
, LPDWORD
, DWORD
);
49 void (*pGetKeyboardConfig
)(KEYBOARD_CONFIG
*);
50 void (*pSetKeyboardConfig
)(KEYBOARD_CONFIG
*, DWORD
);
53 extern KEYBOARD_DRIVER
*KEYBOARD_Driver
;
55 extern BOOL
KEYBOARD_GetBeepActive(void);
56 extern void KEYBOARD_SetBeepActive(BOOL bActivate
);
57 extern void KEYBOARD_Beep(void);
59 extern void KEYBOARD_SendEvent(BYTE bVk
, BYTE bScan
, DWORD dwFlags
, DWORD posX
, DWORD posY
, DWORD time
);
61 #define WINE_KEYBDEVENT_MAGIC ( ('K'<<24)|('E'<<16)|('Y'<<8)|'B' )
62 typedef struct _WINE_KEYBDEVENT
71 #endif /* __WINE_KEYBOARD_H */