summaryrefslogtreecommitdiff
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
parent384099457e9d938871019ba2e5afc20280328884 (diff)
Updated fix for ABNT2 and HK_Toggle keys.
-rw-r--r--hw/xwin/ChangeLog6
-rw-r--r--hw/xwin/winkeybd.c16
-rwxr-xr-xhw/xwin/winkeynames.h4
3 files changed, 23 insertions, 3 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog
index 095a006b9..8cfcfdf4d 100644
--- a/hw/xwin/ChangeLog
+++ b/hw/xwin/ChangeLog
@@ -1,5 +1,11 @@
2005-02-08 Alexander Gottwald <ago at freedesktop dot org>
+ * winkeybd.c:
+ * winkeynames.h:
+ Updated fix for ABNT2 and HK_Toggle keys.
+
+2005-02-08 Alexander Gottwald <ago at freedesktop dot org>
+
* winkeybd.h:
* winkeynames.h:
Backout ABNT2 and HK_Toggle fix since it broke keys F1 and F4.
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;
+ }
}
diff --git a/hw/xwin/winkeynames.h b/hw/xwin/winkeynames.h
index 661a8b15f..ed075dea5 100755
--- a/hw/xwin/winkeynames.h
+++ b/hw/xwin/winkeynames.h
@@ -187,15 +187,15 @@
#define KEY_F13 /* F13 0x6e */ 110
#define KEY_F14 /* F14 0x6f */ 111
#define KEY_F15 /* F15 0x70 */ 112
-#define KEY_HKTG /* Hirugana/Katakana tog 0x70 */ 112
#define KEY_F16 /* F16 0x71 */ 113
#define KEY_F17 /* F17 0x72 */ 114
#define KEY_KP_DEC /* KP_DEC 0x73 */ 115
-#define KEY_BSlash2 /* \ _ 0x73 */ 115
#define KEY_KP_Equal /* Equal (Keypad) 0x76 */ 118
#define KEY_XFER /* Kanji Transfer 0x79 */ 121
#define KEY_NFER /* No Kanji Transfer 0x7b */ 123
#define KEY_Yen /* Yen 0x7d */ 125
+#define KEY_HKTG /* Hirugana/Katakana tog 0xc8 */ 200
+#define KEY_BSlash2 /* \ _ 0xcb */ 203
/* These are for "notused" and "unknown" entries in translation maps. */
#define KEY_NOTUSED 0