Author: ablackmann
Date: Sun Nov 1 20:04:42 2009
New Revision: 43903
URL:
http://svn.reactos.org/svn/reactos?rev=43903&view=rev
Log:
Implement the standard ISO 110-key scancode to virtual key conversion table for decoding
the LAYOUT section. God that was tedious...
Modified:
trunk/reactos/tools/kbdtool/parser.c
Modified: trunk/reactos/tools/kbdtool/parser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/kbdtool/parser.c?rev…
==============================================================================
--- trunk/reactos/tools/kbdtool/parser.c [iso-8859-1] (original)
+++ trunk/reactos/tools/kbdtool/parser.c [iso-8859-1] Sun Nov 1 20:04:42 2009
@@ -20,6 +20,14 @@
PCHAR Name;
struct tagKEYNAME* Next;
} KEYNAME, *PKEYNAME;
+
+typedef struct tagSCVK
+{
+ USHORT ScanCode;
+ USHORT VirtualKey;
+ PCHAR Name;
+ PVOID Reserved;
+} SCVK, *PSCVK;
/* GLOBALS ********************************************************************/
@@ -59,6 +67,122 @@
"ENDKBD",
};
+/* ISO 110-key Keyboard Scancode to Virtual Key Conversion Table */
+SCVK ScVk[] =
+{
+ {0x02, '1', NULL, NULL},
+ {0x03, '2', NULL, NULL},
+ {0x04, '3', NULL, NULL},
+ {0x05, '4', NULL, NULL},
+ {0x06, '5', NULL, NULL},
+ {0x07, '6', NULL, NULL},
+ {0x08, '7', NULL, NULL},
+ {0x09, '8', NULL, NULL},
+ {0x0a, '9', NULL, NULL},
+ {0x0b, '0', NULL, NULL},
+ {0x0c, 0xbd, NULL, NULL},
+ {0x0d, 0xbb, NULL, NULL},
+ {0x10, 'Q', NULL, NULL},
+ {0x11, 'W', NULL, NULL},
+ {0x12, 'E', NULL, NULL},
+ {0x13, 'R', NULL, NULL},
+ {0x14, 'T', NULL, NULL},
+ {0x15, 'Y', NULL, NULL},
+ {0x16, 'U', NULL, NULL},
+ {0x17, 'I', NULL, NULL},
+ {0x18, 'O', NULL, NULL},
+ {0x19, 'P', NULL, NULL},
+ {0x1a, 0xdb, NULL, NULL},
+ {0x1b, 0xdd, NULL, NULL},
+ {0x1e, 'A', NULL, NULL},
+ {0x1f, 'S', NULL, NULL},
+ {0x20, 'D', NULL, NULL},
+ {0x21, 'F', NULL, NULL},
+ {0x22, 'G', NULL, NULL},
+ {0x23, 'H', NULL, NULL},
+ {0x24, 'J', NULL, NULL},
+ {0x25, 'K', NULL, NULL},
+ {0x26, 'L', NULL, NULL},
+ {0x27, 0xba, NULL, NULL},
+ {0x28, 0xde, NULL, NULL},
+ {0x29, 0xc0, NULL, NULL},
+ {0x2b, 0xdc, NULL, NULL},
+ {0x2c, 'Z', NULL, NULL},
+ {0x2d, 'X', NULL, NULL},
+ {0x2e, 'C', NULL, NULL},
+ {0x2f, 'V', NULL, NULL},
+ {0x30, 'B', NULL, NULL},
+ {0x31, 'N', NULL, NULL},
+ {0x32, 'M', NULL, NULL},
+ {0x33, 0xbc, NULL, NULL},
+ {0x34, 0xbe, NULL, NULL},
+ {0x35, 0xbf, NULL, NULL},
+ {0x53, 0x6e, NULL, NULL},
+ {0x56, 0xe2, NULL, NULL},
+ {0x73, 0xc1, NULL, NULL},
+ {0x7e, 0xc2, NULL, NULL},
+ {0xe010, 0xb1, "Speedracer: Previous Track", NULL},
+ {0xe019, 0xb0, "Speedracer: Next Track", NULL},
+ {0xe01d, 0xa3, "RControl", NULL},
+ {0xe020, 0xad, "Speedracer: Volume Mute", NULL},
+ {0xe021, 0xb7, "Speedracer: Launch App 2", NULL},
+ {0xe022, 0xb3, "Speedracer: Media Play/Pause", NULL},
+ {0xe024, 0xb2, "Speedracer: Media Stop", NULL},
+ {0xe02e, 0xae, "Speedracer: Volume Up", NULL},
+ {0xe030, 0xaf, "Speedracer: Volume Down", NULL},
+ {0xe032, 0xac, "Speedracer: Browser Home", NULL},
+ {0xe035, 0x6f, "Numpad Divide", NULL},
+ {0xe037, 0x2c, "Snapshot", NULL},
+ {0xe038, 0xa5, "RMenu", NULL},
+ {0xe047, 0x24, "Home", NULL},
+ {0xe048, 0x26, "Up", NULL},
+ {0xe049, 0x21, "Prior", NULL},
+ {0xe04b, 0x25, "Left", NULL},
+ {0xe04d, 0x27, "Right", NULL},
+ {0xe04f, 0x23, "End", NULL},
+ {0xe050, 0x28, "Down", NULL},
+ {0xe051, 0x22, "Next", NULL},
+ {0xe052, 0x2d, "Insert", NULL},
+ {0xe053, 0x2e, "Delete", NULL},
+ {0xe05b, 0x5b, "Left Win", NULL},
+ {0xe05c, 0x5c, "Right Win", NULL},
+ {0xe05d, 0x5d, "Application", NULL},
+ {0xe05e, 0xff, "Power", NULL},
+ {0xe05f, 0x5f, "Speedracer: Sleep", NULL},
+ {0xe060, 0xff, "BAD SCANCODE", NULL},
+ {0xe061, 0xff, "BAD SCANCODE", NULL},
+ {0xe065, 0xaa, "Speedracer: Browser Search", NULL},
+ {0xe066, 0xab, "Speedracer: Browser Favorites", NULL},
+ {0xe067, 0xa8, "Speedracer: Browser Refresh", NULL},
+ {0xe068, 0xa9, "Speedracer: Browser Stop", NULL},
+ {0xe069, 0xa7, "Speedracer: Browser Foward", NULL},
+ {0xe06a, 0xa6, "Speedracer: Browser Back", NULL},
+ {0xe06b, 0xb6, "Speedracer: Launch App 1", NULL},
+ {0xe06c, 0xb4, "Speedracer: Launch Mail", NULL},
+ {0xe06d, 0xb5, "Speedracer: Launch Media Selector", NULL},
+ {0x53, 0x6e, NULL, NULL},
+ {0x0e, 0x08, NULL, NULL},
+ {0x01, 0x1b, NULL, NULL},
+ {0xe01c, 0x0d, "Numpad Enter", NULL},
+ {0x1c, 0x0d, NULL, NULL},
+ {0x39, 0x20, NULL, NULL},
+ {0xe046, 0x03, "Break (Ctrl + Pause)", NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL},
+ {0xFFFF, 0x00, NULL, NULL}
+};
+
/* FUNCTIONS ******************************************************************/
ULONG