summaryrefslogtreecommitdiff
path: root/hw/xwin/winkeybd.c
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-02-08 15:20:01 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2005-02-08 15:20:01 +0000
commit70d3a9192feefd54be93ea71231574c3ed815bf2 (patch)
treed5ddf34e5b9bc0570e9789d3b0273577b2f781bc /hw/xwin/winkeybd.c
parent384099457e9d938871019ba2e5afc20280328884 (diff)
Updated fix for ABNT2 and HK_Toggle keys.
Diffstat (limited to 'hw/xwin/winkeybd.c')
-rw-r--r--hw/xwin/winkeybd.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index c2d2f38c4..cfca00efc 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -78,14 +78,28 @@ winTranslateKey (WPARAM wParam, LPARAM lParam, int *piScanCode)
{
int iKeyFixup = g_iKeyMap[wParam * WIN_KEYMAP_COLS + 1];
int iKeyFixupEx = g_iKeyMap[wParam * WIN_KEYMAP_COLS + 2];
+ int iParamScanCode = LOBYTE (HIWORD (lParam));
/* Branch on special extended, special non-extended, or normal key */
if ((HIWORD (lParam) & KF_EXTENDED) && iKeyFixupEx)
*piScanCode = iKeyFixupEx;
else if (iKeyFixup)
*piScanCode = iKeyFixup;
+ else if (wParam == 0 && iParamScanCode == 0x70)
+ *piScanCode = KEY_HKTG;
else
- *piScanCode = LOBYTE (HIWORD (lParam));
+ switch (iParamScanCode)
+ {
+ case 0x70:
+ *piScanCode = KEY_HKTG;
+ break;
+ case 0x73:
+ *piScanCode = KEY_BSlash2;
+ break;
+ default:
+ *piScanCode = iParamScanCode;
+ break;
+ }
}