[PATCH:xf86-input-keyboard 2/2] Scancode translation table for wskbd on Amiga keyboards.
Thomas Klausner
wiz at NetBSD.org
Thu Nov 12 06:23:21 PST 2015
From: Frank Wille <phx at netbsd.org>
Signed-off-by: Thomas Klausner <wiz at NetBSD.org>
---
src/bsd_KbdMap.c | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/bsd_kbd.c | 5 +++
2 files changed, 126 insertions(+)
diff --git a/src/bsd_KbdMap.c b/src/bsd_KbdMap.c
index 95c6bd8..4b785af 100644
--- a/src/bsd_KbdMap.c
+++ b/src/bsd_KbdMap.c
@@ -841,6 +841,122 @@ TransMapRec wsAdb = {
wsAdbMap
};
+/* Map for amiga keyboards */
+static CARD8 wsAmigaMap[] = {
+ /* 0 */ KEY_Tilde,
+ /* 1 */ KEY_1,
+ /* 2 */ KEY_2,
+ /* 3 */ KEY_3,
+ /* 4 */ KEY_4,
+ /* 5 */ KEY_5,
+ /* 6 */ KEY_6,
+ /* 7 */ KEY_7,
+ /* 8 */ KEY_8,
+ /* 9 */ KEY_9,
+ /* 10 */ KEY_0,
+ /* 11 */ KEY_Minus,
+ /* 12 */ KEY_Equal,
+ /* 13 */ KEY_BSlash, /* key in this position only on Amiga */
+ /* 14 */ KEY_NOTUSED,
+ /* 15 */ KEY_KP_0,
+ /* 16 */ KEY_Q,
+ /* 17 */ KEY_W,
+ /* 18 */ KEY_E,
+ /* 19 */ KEY_R,
+ /* 20 */ KEY_T,
+ /* 21 */ KEY_Y,
+ /* 22 */ KEY_U,
+ /* 23 */ KEY_I,
+ /* 24 */ KEY_O,
+ /* 25 */ KEY_P,
+ /* 26 */ KEY_LBrace,
+ /* 27 */ KEY_RBrace,
+ /* 28 */ KEY_NOTUSED,
+ /* 29 */ KEY_KP_1,
+ /* 30 */ KEY_KP_2,
+ /* 31 */ KEY_KP_3,
+ /* 32 */ KEY_A,
+ /* 33 */ KEY_S,
+ /* 34 */ KEY_D,
+ /* 35 */ KEY_F,
+ /* 36 */ KEY_G,
+ /* 37 */ KEY_H,
+ /* 38 */ KEY_J,
+ /* 39 */ KEY_K,
+ /* 40 */ KEY_L,
+ /* 41 */ KEY_SemiColon,
+ /* 42 */ KEY_Quote,
+ /* 43 */ KEY_BSlash, /* # on international keyboards */
+ /* 44 */ KEY_NOTUSED,
+ /* 45 */ KEY_KP_4,
+ /* 46 */ KEY_KP_5,
+ /* 47 */ KEY_KP_6,
+ /* 48 */ KEY_Less,
+ /* 49 */ KEY_Z,
+ /* 50 */ KEY_X,
+ /* 51 */ KEY_C,
+ /* 52 */ KEY_V,
+ /* 53 */ KEY_B,
+ /* 54 */ KEY_N,
+ /* 55 */ KEY_M,
+ /* 56 */ KEY_Comma,
+ /* 57 */ KEY_Period,
+ /* 58 */ KEY_Slash,
+ /* 59 */ KEY_NOTUSED,
+ /* 60 */ KEY_KP_Decimal,
+ /* 61 */ KEY_KP_7,
+ /* 62 */ KEY_KP_8,
+ /* 63 */ KEY_KP_9,
+ /* 64 */ KEY_Space,
+ /* 65 */ KEY_BackSpace,
+ /* 66 */ KEY_Tab,
+ /* 67 */ KEY_KP_Enter,
+ /* 68 */ KEY_Enter,
+ /* 69 */ KEY_Escape,
+ /* 70 */ KEY_Delete,
+ /* 71 */ KEY_NOTUSED,
+ /* 72 */ KEY_NOTUSED,
+ /* 73 */ KEY_NOTUSED,
+ /* 74 */ KEY_KP_Minus,
+ /* 75 */ KEY_NOTUSED,
+ /* 76 */ KEY_Up,
+ /* 77 */ KEY_Down,
+ /* 78 */ KEY_Right,
+ /* 79 */ KEY_Left,
+ /* 80 */ KEY_F1,
+ /* 81 */ KEY_F2,
+ /* 82 */ KEY_F3,
+ /* 83 */ KEY_F4,
+ /* 84 */ KEY_F5,
+ /* 85 */ KEY_F6,
+ /* 86 */ KEY_F7,
+ /* 87 */ KEY_F8,
+ /* 88 */ KEY_F9,
+ /* 89 */ KEY_F10,
+ /* 90 */ KEY_UNKNOWN, /* Keypad [ */
+ /* 91 */ KEY_UNKNOWN, /* Keypad ] */
+ /* 92 */ KEY_KP_Divide,
+ /* 93 */ KEY_KP_Multiply,
+ /* 94 */ KEY_KP_Plus,
+ /* 95 */ KEY_Help,
+ /* 96 */ KEY_ShiftL,
+ /* 97 */ KEY_ShiftR,
+ /* 98 */ KEY_NOTUSED,
+ /* 99 */ KEY_LCtrl,
+ /* 100 */ KEY_Alt,
+ /* 101 */ KEY_AltLang,
+ /* 102 */ KEY_LMeta,
+ /* 103 */ KEY_RMeta
+};
+#define WS_AMIGA_MAP_SIZE (sizeof(wsAmigaMap)/sizeof(*wsAmigaMap))
+
+static
+TransMapRec wsAmiga = {
+ 0,
+ WS_AMIGA_MAP_SIZE,
+ wsAmigaMap
+};
+
/* Map for LK201 keyboards */
static CARD8 wsLk201Map[] = {
/* 0 */ KEY_F1,
@@ -1386,6 +1502,11 @@ KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
pKbd->scancodeMap = &wsAdb;
break;
#endif
+#ifdef WSKBD_TYPE_AMIGA
+ case WSKBD_TYPE_AMIGA:
+ pKbd->scancodeMap = &wsAmiga;
+ break;
+#endif
#ifdef WSKBD_TYPE_LK201
case WSKBD_TYPE_LK201:
pKbd->scancodeMap = &wsLk201;
diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c
index 284833d..62482ad 100644
--- a/src/bsd_kbd.c
+++ b/src/bsd_kbd.c
@@ -459,6 +459,11 @@ OpenKeyboard(InputInfoPtr pInfo)
printWsType("ADB", pInfo->name);
break;
#endif
+#ifdef WSKBD_TYPE_AMIGA
+ case WSKBD_TYPE_AMIGA:
+ printWsType("Amiga", pInfo->name);
+ break;
+#endif
#ifdef WSKBD_TYPE_LK201
case WSKBD_TYPE_LK201:
printWsType("LK201", pInfo->name);
--
2.6.3
More information about the xorg-devel
mailing list