|
Last change
on this file since 21911 was 21885, checked in by dmik, 14 years ago |
|
Fix crashes in GUI apps when pressing modifier keys.
This was due the fact that BYTE is signed in the toolkit and converting it
to an unsigned int causes the sign bit to be extended in the result while
the code assumes that the extension is made with zeroes (this is how
VAC converts signed integers of smaller precisions to unsigned ones).
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | /* $Id: winkeyboard.h,v 1.3 2001-11-09 15:39:12 phaller Exp $ */
|
|---|
| 2 | /*
|
|---|
| 3 | * Win32 <-> PM key translation
|
|---|
| 4 | *
|
|---|
| 5 | *
|
|---|
| 6 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 7 | *
|
|---|
| 8 | */
|
|---|
| 9 | #ifndef __WINKEYBOARD_H__
|
|---|
| 10 | #define __WINKEYBOARD_H__
|
|---|
| 11 |
|
|---|
| 12 | #ifdef __cplusplus
|
|---|
| 13 | extern "C" {
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 | void WIN32API KeyTranslatePMToWinBuf(PUCHAR pmkey, PUCHAR winkey, int nrkeys);
|
|---|
| 17 | void WIN32API KeyTranslatePMScanToWinVKey(UCHAR uchPMScan,
|
|---|
| 18 | BOOL bNumLock,
|
|---|
| 19 | PUCHAR puchWinVKey,
|
|---|
| 20 | WORD *pwWinScan,
|
|---|
| 21 | PBOOL pfExtended);
|
|---|
| 22 | UCHAR WIN32API KeyTranslateWinVKeyToPMScan(UCHAR uchWinVKey, BOOL fExtended);
|
|---|
| 23 | UCHAR WIN32API KeyTranslateWinScanToPMScan(UCHAR uchWinScan, BOOL fExtended);
|
|---|
| 24 |
|
|---|
| 25 | #define KEYOVERLAYSTATE_DONTCARE 0
|
|---|
| 26 | #define KEYOVERLAYSTATE_DOWN 1
|
|---|
| 27 | #define KEYOVERLAYSTATE_UP 2
|
|---|
| 28 |
|
|---|
| 29 | void WIN32API KeySetOverlayKeyState(int nVirtKey,
|
|---|
| 30 | char nState);
|
|---|
| 31 |
|
|---|
| 32 | #ifdef __cplusplus
|
|---|
| 33 | } // extern "C"
|
|---|
| 34 | #endif
|
|---|
| 35 |
|
|---|
| 36 | #endif //__WINKEYBOARD_H__
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.