[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH xenvkbd] Dynamically build key-code to usage map
This patch creates a header defining the linux keycodes used by the vkbd protocol and macros to map those (by name) to HID usage codes. A new function then makes use of these of the new definitions and macros to create a direct mapping from key-code to usage dynamically during ring initialization. The patch also adds missing locking inside the DPC and a shutdown race which could occasionally free the ring structure from underneath the DPC. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- include/linux-keycodes.h | 249 +++++++++++++++++++++++++++++++++++++++++++++ src/xenvkbd/ring.c | 97 +++++++++++++----- src/xenvkbd/vkbd.h | 256 +++++++++++++++++++++++------------------------ 3 files changed, 449 insertions(+), 153 deletions(-) create mode 100644 include/linux-keycodes.h diff --git a/include/linux-keycodes.h b/include/linux-keycodes.h new file mode 100644 index 0000000..77b4c4e --- /dev/null +++ b/include/linux-keycodes.h @@ -0,0 +1,249 @@ +#define KEY_RESERVED 0 +#define KEY_ESC 1 +#define KEY_1 2 +#define KEY_2 3 +#define KEY_3 4 +#define KEY_4 5 +#define KEY_5 6 +#define KEY_6 7 +#define KEY_7 8 +#define KEY_8 9 +#define KEY_9 10 +#define KEY_0 11 +#define KEY_MINUS 12 +#define KEY_EQUAL 13 +#define KEY_BACKSPACE 14 +#define KEY_TAB 15 +#define KEY_Q 16 +#define KEY_W 17 +#define KEY_E 18 +#define KEY_R 19 +#define KEY_T 20 +#define KEY_Y 21 +#define KEY_U 22 +#define KEY_I 23 +#define KEY_O 24 +#define KEY_P 25 +#define KEY_LEFTBRACE 26 +#define KEY_RIGHTBRACE 27 +#define KEY_ENTER 28 +#define KEY_LEFTCTRL 29 +#define KEY_A 30 +#define KEY_S 31 +#define KEY_D 32 +#define KEY_F 33 +#define KEY_G 34 +#define KEY_H 35 +#define KEY_J 36 +#define KEY_K 37 +#define KEY_L 38 +#define KEY_SEMICOLON 39 +#define KEY_APOSTROPHE 40 +#define KEY_GRAVE 41 +#define KEY_LEFTSHIFT 42 +#define KEY_BACKSLASH 43 +#define KEY_Z 44 +#define KEY_X 45 +#define KEY_C 46 +#define KEY_V 47 +#define KEY_B 48 +#define KEY_N 49 +#define KEY_M 50 +#define KEY_COMMA 51 +#define KEY_DOT 52 +#define KEY_SLASH 53 +#define KEY_RIGHTSHIFT 54 +#define KEY_KPASTERISK 55 +#define KEY_LEFTALT 56 +#define KEY_SPACE 57 +#define KEY_CAPSLOCK 58 +#define KEY_F1 59 +#define KEY_F2 60 +#define KEY_F3 61 +#define KEY_F4 62 +#define KEY_F5 63 +#define KEY_F6 64 +#define KEY_F7 65 +#define KEY_F8 66 +#define KEY_F9 67 +#define KEY_F10 68 +#define KEY_NUMLOCK 69 +#define KEY_SCROLLLOCK 70 +#define KEY_KP7 71 +#define KEY_KP8 72 +#define KEY_KP9 73 +#define KEY_KPMINUS 74 +#define KEY_KP4 75 +#define KEY_KP5 76 +#define KEY_KP6 77 +#define KEY_KPPLUS 78 +#define KEY_KP1 79 +#define KEY_KP2 80 +#define KEY_KP3 81 +#define KEY_KP0 82 +#define KEY_KPDOT 83 +// GAP +#define KEY_ZENKAKUHANKAKU 85 +#define KEY_102ND 86 +#define KEY_F11 87 +#define KEY_F12 88 +#define KEY_RO 89 +#define KEY_KATAKANA 90 +#define KEY_HIRAGANA 91 +#define KEY_HENKAN 92 +#define KEY_KATAKANAHIRAGANA 93 +#define KEY_MUHENKAN 94 +#define KEY_KPJPCOMMA 95 +#define KEY_KPENTER 96 +#define KEY_RIGHTCTRL 97 +#define KEY_KPSLASH 98 +#define KEY_SYSRQ 99 +#define KEY_RIGHTALT 100 +#define KEY_LINEFEED 101 +#define KEY_HOME 102 +#define KEY_UP 103 +#define KEY_PAGEUP 104 +#define KEY_LEFT 105 +#define KEY_RIGHT 106 +#define KEY_END 107 +#define KEY_DOWN 108 +#define KEY_PAGEDOWN 109 +#define KEY_INSERT 110 +#define KEY_DELETE 111 +#define KEY_MACRO 112 +#define KEY_MUTE 113 +#define KEY_VOLUMEDOWN 114 +#define KEY_VOLUMEUP 115 +#define KEY_POWER 116 +#define KEY_KPEQUAL 117 +#define KEY_KPPLUSMINUS 118 +#define KEY_PAUSE 119 +#define KEY_SCALE 120 +#define KEY_KPCOMMA 121 +#define KEY_HANGEUL 122 +#define KEY_HANJA 123 +#define KEY_YEN 124 +#define KEY_LEFTMETA 125 +#define KEY_RIGHTMETA 126 +#define KEY_COMPOSE 127 +#define KEY_STOP 128 +#define KEY_AGAIN 129 +#define KEY_PROPS 130 +#define KEY_UNDO 131 +#define KEY_FRONT 132 +#define KEY_COPY 133 +#define KEY_OPEN 134 +#define KEY_PASTE 135 +#define KEY_FIND 136 +#define KEY_CUT 137 +#define KEY_HELP 138 +#define KEY_MENU 139 +#define KEY_CALC 140 +#define KEY_SETUP 141 +#define KEY_SLEEP 142 +#define KEY_WAKEUP 143 +#define KEY_FILE 144 +#define KEY_SENDFILE 145 +#define KEY_DELETEFILE 146 +#define KEY_XFER 147 +#define KEY_PROG1 148 +#define KEY_PROG2 149 +#define KEY_WWW 150 +#define KEY_MSDOS 151 +#define KEY_SCREENLOCK 152 +#define KEY_ROTATE_DISPLAY 153 +#define KEY_CYCLEWINDOWS 154 +#define KEY_MAIL 155 +#define KEY_BOOKMARKS 156 +#define KEY_COMPUTER 157 +#define KEY_BACK 158 +#define KEY_FORWARD 159 +#define KEY_CLOSECD 160 +#define KEY_EJECTCD 161 +#define KEY_EJECTCLOSECD 162 +#define KEY_NEXTSONG 163 +#define KEY_PLAYPAUSE 164 +#define KEY_PREVIOUSSONG 165 +#define KEY_STOPCD 166 +#define KEY_RECORD 167 +#define KEY_REWIND 168 +#define KEY_PHONE 169 +#define KEY_ISO 170 +#define KEY_CONFIG 171 +#define KEY_HOMEPAGE 172 +#define KEY_REFRESH 173 +#define KEY_EXIT 174 +#define KEY_MOVE 175 +#define KEY_EDIT 176 +#define KEY_SCROLLUP 177 +#define KEY_SCROLLDOWN 178 +#define KEY_KPLEFTPAREN 179 +#define KEY_KPRIGHTPAREN 180 +#define KEY_NEW 181 +#define KEY_REDO 182 +#define KEY_F13 183 +#define KEY_F14 184 +#define KEY_F15 185 +#define KEY_F16 186 +#define KEY_F17 187 +#define KEY_F18 188 +#define KEY_F19 189 +#define KEY_F20 190 +#define KEY_F21 191 +#define KEY_F22 192 +#define KEY_F23 193 +#define KEY_F24 194 +//GAP +//GAP +//GAP +//GAP +//GAP +#define KEY_PLAYCD 200 +#define KEY_PAUSECD 201 +#define KEY_PROG3 202 +#define KEY_PROG4 203 +#define KEY_DASHBOARD 204 +#define KEY_SUSPEND 205 +#define KEY_CLOSE 206 +#define KEY_PLAY 207 +#define KEY_FASTFORWARD 208 +#define KEY_BASSBOOST 209 +#define KEY_PRINT 210 +#define KEY_HP 211 +#define KEY_CAMERA 212 +#define KEY_SOUND 213 +#define KEY_QUESTION 214 +#define KEY_EMAIL 215 +#define KEY_CHAT 216 +#define KEY_SEARCH 217 +#define KEY_CONNECT 218 +#define KEY_FINANCE 219 +#define KEY_SPORT 220 +#define KEY_SHOP 221 +#define KEY_ALTERASE 222 +#define KEY_CANCEL 223 +#define KEY_BRIGHTNESSDOWN 224 +#define KEY_BRIGHTNESSUP 225 +#define KEY_MEDIA 226 +#define KEY_SWITCHVIDEOMODE 227 +#define KEY_KBDILLUMTOGGLE 228 +#define KEY_KBDILLUMDOWN 229 +#define KEY_KBDILLUMUP 230 +#define KEY_SEND 231 +#define KEY_REPLY 232 +#define KEY_FORWARDMAIL 233 +#define KEY_SAVE 234 +#define KEY_DOCUMENTS 235 +#define KEY_BATTERY 236 +#define KEY_BLUETOOTH 237 +#define KEY_WLAN 238 +#define KEY_UWB 239 +#define KEY_UNKNOWN 240 +#define KEY_VIDEO_NEXT 241 +#define KEY_VIDEO_PREV 242 +#define KEY_BRIGHTNESS_CYCLE 243 +#define KEY_BRIGHTNESS_AUTO 244 +#define KEY_DISPLAY_OFF 245 +#define KEY_WWAN 246 +#define KEY_RFKILL 247 +#define KEY_MICMUTE 248 diff --git a/src/xenvkbd/ring.c b/src/xenvkbd/ring.c index d970cec..25d97ec 100644 --- a/src/xenvkbd/ring.c +++ b/src/xenvkbd/ring.c @@ -84,6 +84,8 @@ struct _XENVKBD_RING { XENVKBD_HID_ABSMOUSE AbsMouseReport; BOOLEAN KeyboardPending; BOOLEAN AbsMousePending; + + USHORT KeyCodeToUsageMapping[1 << (sizeof(UCHAR) * 8)]; }; #define XENVKBD_RING_TAG 'gniR' @@ -186,13 +188,44 @@ SetArray( } } +struct _KEY_CODE_TO_USAGE { + UCHAR KeyCode; + USHORT Usage; +}; + +#define DEFINE_USAGE(_KeyCode, _Usage) \ + { _KeyCode, _Usage } + +static struct _KEY_CODE_TO_USAGE KeyCodeToUsageTable[] = { + DEFINE_USAGE_TABLE +}; + +#undef DEFINE_USAGE + +static VOID RingBuildKeyCodeToUsageMapping( + IN PXENVKBD_RING Ring + ) +{ + ULONG Index; + + for (Index = 0; Index < ARRAYSIZE(KeyCodeToUsageTable); Index++) { + struct _KEY_CODE_TO_USAGE *Entry = &KeyCodeToUsageTable[Index]; + + ASSERT3U(Entry->KeyCode, <, ARRAYSIZE(Ring->KeyCodeToUsageMapping)); + ASSERT3U(Ring->KeyCodeToUsageMapping[Entry->KeyCode], ==, 0); + Ring->KeyCodeToUsageMapping[Entry->KeyCode] = Entry->Usage; + } +} + static FORCEINLINE USHORT -KeyCodeToUsage( - IN ULONG KeyCode +__RingKeyCodeToUsage( + IN PXENVKBD_RING Ring, + IN ULONG KeyCode ) { - if (KeyCode < sizeof(VkbdKeyCodeToUsage)/sizeof(VkbdKeyCodeToUsage[0])) - return VkbdKeyCodeToUsage[KeyCode]; + if (KeyCode < ARRAYSIZE(Ring->KeyCodeToUsageMapping)) + return Ring->KeyCodeToUsageMapping[KeyCode]; + return 0; } @@ -232,7 +265,7 @@ __RingEventKeypress( } else { // map KeyCode to Usage - USHORT Usage = KeyCodeToUsage(KeyCode); + USHORT Usage = __RingKeyCodeToUsage(Ring, KeyCode); if (Usage == 0) return; // non-standard key @@ -272,6 +305,25 @@ __RingEventPosition( sizeof(XENVKBD_HID_ABSMOUSE)); } +static VOID +RingAcquireLock( + IN PVOID Context + ) +{ + PXENVKBD_RING Ring = Context; + KeAcquireSpinLockAtDpcLevel(&Ring->Lock); +} + +static VOID +RingReleaseLock( + IN PVOID Context + ) +{ + PXENVKBD_RING Ring = Context; +#pragma warning(suppress:26110) + KeReleaseSpinLockFromDpcLevel(&Ring->Lock); +} + __drv_functionClass(KDEFERRED_ROUTINE) __drv_maxIRQL(DISPATCH_LEVEL) __drv_minIRQL(DISPATCH_LEVEL) @@ -293,6 +345,11 @@ RingDpc( ASSERT(Ring != NULL); + RingAcquireLock(Ring); + + if (!Ring->Enabled) + goto done; + for (;;) { ULONG in_cons; ULONG in_prod; @@ -355,25 +412,9 @@ RingDpc( &Ring->EvtchnInterface, Ring->Channel, FALSE); -} - -static VOID -RingAcquireLock( - IN PVOID Context - ) -{ - PXENVKBD_RING Ring = Context; - KeAcquireSpinLockAtDpcLevel(&Ring->Lock); -} -static VOID -RingReleaseLock( - IN PVOID Context - ) -{ - PXENVKBD_RING Ring = Context; -#pragma warning(suppress:26110) - KeReleaseSpinLockFromDpcLevel(&Ring->Lock); +done: + RingReleaseLock(Ring); } KSERVICE_ROUTINE RingEvtchnCallback; @@ -468,6 +509,8 @@ RingInitialize( FdoGetEvtchnInterface(PdoGetFdo(FrontendGetPdo(Frontend)), &(*Ring)->EvtchnInterface); + RingBuildKeyCodeToUsageMapping(*Ring); + return STATUS_SUCCESS; fail1: @@ -801,6 +844,8 @@ RingDisconnect( { Trace("=====>\n"); + Ring->Connected = FALSE; + XENBUS_DEBUG(Deregister, &Ring->DebugInterface, Ring->DebugCallback); @@ -850,8 +895,13 @@ RingTeardown( ) { Trace("=====>\n"); + + KeFlushQueuedDpcs(); Ring->Dpcs = 0; + RtlZeroMemory(&Ring->KeyCodeToUsageMapping, + sizeof (Ring->KeyCodeToUsageMapping)); + Ring->AbsPointer = FALSE; Ring->RawPointer = FALSE; @@ -877,6 +927,7 @@ RingTeardown( ASSERT(IsZeroMemory(Ring, sizeof (XENVKBD_RING))); __RingFree(Ring); + Trace("<=====\n"); } diff --git a/src/xenvkbd/vkbd.h b/src/xenvkbd/vkbd.h index e455078..d8b2725 100644 --- a/src/xenvkbd/vkbd.h +++ b/src/xenvkbd/vkbd.h @@ -125,135 +125,131 @@ static const HID_DEVICE_ATTRIBUTES VkbdDeviceAttributes = { 0x0101 }; -static const USHORT VkbdKeyCodeToUsage[] = { - 0x00, // KEY_RESERVED - 0x29, // KEY_ESC - 0x1E, // KEY_1 - 0x1F, // KEY_2 - 0x20, // KEY_3 - 0x21, // KEY_4 - 0x22, // KEY_5 - 0x23, // KEY_6 - 0x24, // KEY_7 - 0x25, // KEY_8 - 0x26, // KEY_9 - 0x27, // KEY_0 - 0x2D, // KEY_MINUS - 0x2E, // KEY_EQUAL - 0x2A, // KEY_BACKSPACE - 0x2B, // KEY_TAB - 0x14, // KEY_Q - 0x1A, // KEY_W - 0x08, // KEY_E - 0x15, // KEY_R - 0x17, // KEY_T - 0x1C, // KEY_Y - 0x18, // KEY_U - 0x0C, // KEY_I - 0x12, // KEY_O - 0x13, // KEY_P - 0x2F, // KEY_LEFTBRACE - 0x30, // KEY_RIGHTBRACE - 0x28, // KEY_ENTER - 0xE0, // KEY_LEFTCTRL - 0x04, // KEY_A - 0x16, // KEY_S - 0x07, // KEY_D - 0x09, // KEY_F - 0x0A, // KEY_G - 0x0B, // KEY_H - 0x0D, // KEY_J - 0x0E, // KEY_K - 0x0F, // KEY_L - 0x33, // KEY_SEMICOLON - 0x24, // KEY_APOSTROPHE - 0x35, // KEY_GRAVE - 0xE1, // KEY_LEFTSHIFT - 0x31, // KEY_BACKSLASH - 0x1D, // KEY_Z - 0x1B, // KEY_X - 0x06, // KEY_C - 0x19, // KEY_V - 0x05, // KEY_B - 0x11, // KEY_N - 0x10, // KEY_M - 0x36, // KEY_COMMA - 0x37, // KEY_DOT - 0x38, // KEY_SLASH - 0xE5, // KEY_RIGHTSHIFT - 0x55, // KEY_KPASTERISK - 0xE2, // KEY_LEFTALT - 0x2C, // KEY_SPACE - 0x39, // KEY_CAPSLOCK - 0x3A, // KEY_F1 - 0x3B, // KEY_F2 - 0x3C, // KEY_F3 - 0x3D, // KEY_F4 - 0x3E, // KEY_F5 - 0x3F, // KEY_F6 - 0x40, // KEY_F7 - 0x41, // KEY_F8 - 0x42, // KEY_F9 - 0x43, // KEY_F10 - 0x53, // KEY_NUMLOCK - 0x47, // KEY_SCROLLLOCK - 0x5F, // KEY_KP7 - 0x60, // KEY_KP8 - 0x61, // KEY_KP9 - 0x56, // KEY_KPMINUS - 0x5C, // KEY_KP4 - 0x5D, // KEY_KP5 - 0x5E, // KEY_KP6 - 0x57, // KEY_KPPLUS - 0x59, // KEY_KP1 - 0x5A, // KEY_KP2 - 0x5B, // KEY_KP3 - 0x62, // KEY_KP0 - 0x63, // KEY_KPDOT - 0x00, // gap in sequence - 0x8F, // KEY_ZENKAKUHANKAKU - 0x64, // KEY_102ND - 0x44, // KEY_F11 - 0x45, // KEY_F12 - 0x87, // KEY_RO - 0x88, // KEY_KATAKANA - 0x8A, // KEY_HIRAGANA - 0x8B, // KEY_HENKAN - 0x8C, // KEY_KATAKANAHIRAGANA - 0x8D, // KEY_MUHENKAN - 0x8E, // KEY_KPJPCOMMA - 0x58, // KEY_KPENTER - 0xE4, // KEY_RIGHTCTRL - 0x54, // KEY_KPSLASH - 0x48, // KEY_SYSRQ - 0xE6, // KEY_RIGHTALT - 0x00, // gap in sequence - 0x4A, // KEY_HOME - 0x52, // KEY_UP - 0x4B, // KEY_PAGEUP - 0x50, // KEY_LEFT - 0x4F, // KEY_RIGHT - 0x4D, // KEY_END - 0x51, // KEY_DOWN - 0x4E, // KEY_PAGEDOWN - 0x49, // KEY_INSERT - 0x4D, // KEY_DELETE - 0x00, // gap in sequence - 0x7F, // KEY_MUTE - 0x81, // KEY_VOLUMEDOWN - 0x80, // KEY_VOLUMEUP - 0x66, // KEY_POWER - 0x67, // KEY_KPEQUAL - 0x00, // KEY_KPPLUSMINUS - 0x00, // gap in sequence - 0x00, // gap in sequence - 0x00, // gap in sequence - 0x85, // KEY_KPCOMMA - 0x90, // KEY_HANGEUL - 0x91, // KEY_HANJA - 0x89, // KEY_YEN - 0xE3, // KEY_LEFTMETA - 0xE7, // KEY_RIGHTMETA -}; +// Linux keycode definitions +#include <linux-keycodes.h> + +#define DEFINE_USAGE_TABLE \ + DEFINE_USAGE(KEY_RESERVED, 0x00), \ + DEFINE_USAGE(KEY_ESC, 0x29), \ + DEFINE_USAGE(KEY_1, 0x1E), \ + DEFINE_USAGE(KEY_2, 0x1F), \ + DEFINE_USAGE(KEY_3, 0x20), \ + DEFINE_USAGE(KEY_4, 0x21), \ + DEFINE_USAGE(KEY_5, 0x22), \ + DEFINE_USAGE(KEY_6, 0x23), \ + DEFINE_USAGE(KEY_7, 0x24), \ + DEFINE_USAGE(KEY_8, 0x25), \ + DEFINE_USAGE(KEY_9, 0x26), \ + DEFINE_USAGE(KEY_0, 0x27), \ + DEFINE_USAGE(KEY_MINUS, 0x2D), \ + DEFINE_USAGE(KEY_EQUAL, 0x2E), \ + DEFINE_USAGE(KEY_BACKSPACE, 0x2A), \ + DEFINE_USAGE(KEY_TAB, 0x2B), \ + DEFINE_USAGE(KEY_Q, 0x14), \ + DEFINE_USAGE(KEY_W, 0x1A), \ + DEFINE_USAGE(KEY_E, 0x08), \ + DEFINE_USAGE(KEY_R, 0x15), \ + DEFINE_USAGE(KEY_T, 0x17), \ + DEFINE_USAGE(KEY_Y, 0x1C), \ + DEFINE_USAGE(KEY_U, 0x18), \ + DEFINE_USAGE(KEY_I, 0x0C), \ + DEFINE_USAGE(KEY_O, 0x12), \ + DEFINE_USAGE(KEY_P, 0x13), \ + DEFINE_USAGE(KEY_LEFTBRACE, 0x2F), \ + DEFINE_USAGE(KEY_RIGHTBRACE, 0x30), \ + DEFINE_USAGE(KEY_ENTER, 0x28), \ + DEFINE_USAGE(KEY_LEFTCTRL, 0xE0), \ + DEFINE_USAGE(KEY_A, 0x04), \ + DEFINE_USAGE(KEY_S, 0x16), \ + DEFINE_USAGE(KEY_D, 0x07), \ + DEFINE_USAGE(KEY_F, 0x09), \ + DEFINE_USAGE(KEY_G, 0x0A), \ + DEFINE_USAGE(KEY_H, 0x0B), \ + DEFINE_USAGE(KEY_J, 0x0D), \ + DEFINE_USAGE(KEY_K, 0x0E), \ + DEFINE_USAGE(KEY_L, 0x0F), \ + DEFINE_USAGE(KEY_SEMICOLON, 0x33), \ + DEFINE_USAGE(KEY_APOSTROPHE, 0x34), \ + DEFINE_USAGE(KEY_GRAVE, 0x35), \ + DEFINE_USAGE(KEY_LEFTSHIFT, 0xE1), \ + DEFINE_USAGE(KEY_BACKSLASH, 0x31), \ + DEFINE_USAGE(KEY_Z, 0x1D), \ + DEFINE_USAGE(KEY_X, 0x1B), \ + DEFINE_USAGE(KEY_C, 0x06), \ + DEFINE_USAGE(KEY_V, 0x19), \ + DEFINE_USAGE(KEY_B, 0x05), \ + DEFINE_USAGE(KEY_N, 0x11), \ + DEFINE_USAGE(KEY_M, 0x10), \ + DEFINE_USAGE(KEY_COMMA, 0x36), \ + DEFINE_USAGE(KEY_DOT, 0x37), \ + DEFINE_USAGE(KEY_SLASH, 0x38), \ + DEFINE_USAGE(KEY_RIGHTSHIFT, 0xE5), \ + DEFINE_USAGE(KEY_KPASTERISK, 0x55), \ + DEFINE_USAGE(KEY_LEFTALT, 0xE2), \ + DEFINE_USAGE(KEY_SPACE, 0x2C), \ + DEFINE_USAGE(KEY_CAPSLOCK, 0x39), \ + DEFINE_USAGE(KEY_F1, 0x3A), \ + DEFINE_USAGE(KEY_F2, 0x3B), \ + DEFINE_USAGE(KEY_F3, 0x3C), \ + DEFINE_USAGE(KEY_F4, 0x3D), \ + DEFINE_USAGE(KEY_F5, 0x3E), \ + DEFINE_USAGE(KEY_F6, 0x3F), \ + DEFINE_USAGE(KEY_F7, 0x40), \ + DEFINE_USAGE(KEY_F8, 0x41), \ + DEFINE_USAGE(KEY_F9, 0x42), \ + DEFINE_USAGE(KEY_F10, 0x43), \ + DEFINE_USAGE(KEY_NUMLOCK, 0x53), \ + DEFINE_USAGE(KEY_SCROLLLOCK, 0x47), \ + DEFINE_USAGE(KEY_KP7, 0x5F), \ + DEFINE_USAGE(KEY_KP8, 0x60), \ + DEFINE_USAGE(KEY_KP9, 0x61), \ + DEFINE_USAGE(KEY_KPMINUS, 0x56), \ + DEFINE_USAGE(KEY_KP4, 0x5C), \ + DEFINE_USAGE(KEY_KP5, 0x5D), \ + DEFINE_USAGE(KEY_KP6, 0x5E), \ + DEFINE_USAGE(KEY_KPPLUS, 0x57), \ + DEFINE_USAGE(KEY_KP1, 0x59), \ + DEFINE_USAGE(KEY_KP2, 0x5A), \ + DEFINE_USAGE(KEY_KP3, 0x5B), \ + DEFINE_USAGE(KEY_KP0, 0x62), \ + DEFINE_USAGE(KEY_KPDOT, 0x63), \ + DEFINE_USAGE(KEY_ZENKAKUHANKAKU, 0x8F), \ + DEFINE_USAGE(KEY_102ND, 0x64), \ + DEFINE_USAGE(KEY_F11, 0x44), \ + DEFINE_USAGE(KEY_F12, 0x45), \ + DEFINE_USAGE(KEY_RO, 0x87), \ + DEFINE_USAGE(KEY_KATAKANA, 0x88), \ + DEFINE_USAGE(KEY_HIRAGANA, 0x8A), \ + DEFINE_USAGE(KEY_HENKAN, 0x8B), \ + DEFINE_USAGE(KEY_KATAKANAHIRAGANA, 0x8C), \ + DEFINE_USAGE(KEY_MUHENKAN, 0x8D), \ + DEFINE_USAGE(KEY_KPJPCOMMA, 0x8E), \ + DEFINE_USAGE(KEY_KPENTER, 0x58), \ + DEFINE_USAGE(KEY_RIGHTCTRL, 0xE4), \ + DEFINE_USAGE(KEY_KPSLASH, 0x54), \ + DEFINE_USAGE(KEY_SYSRQ, 0x48), \ + DEFINE_USAGE(KEY_RIGHTALT, 0xE6), \ + DEFINE_USAGE(KEY_HOME, 0x4A), \ + DEFINE_USAGE(KEY_UP, 0x52), \ + DEFINE_USAGE(KEY_PAGEUP, 0x4B), \ + DEFINE_USAGE(KEY_LEFT, 0x50), \ + DEFINE_USAGE(KEY_RIGHT, 0x4F), \ + DEFINE_USAGE(KEY_END, 0x4D), \ + DEFINE_USAGE(KEY_DOWN, 0x51), \ + DEFINE_USAGE(KEY_PAGEDOWN, 0x4E), \ + DEFINE_USAGE(KEY_INSERT, 0x49), \ + DEFINE_USAGE(KEY_DELETE, 0x4D), \ + DEFINE_USAGE(KEY_MUTE, 0x7F), \ + DEFINE_USAGE(KEY_VOLUMEDOWN, 0x81), \ + DEFINE_USAGE(KEY_VOLUMEUP, 0x80), \ + DEFINE_USAGE(KEY_POWER, 0x66), \ + DEFINE_USAGE(KEY_KPEQUAL, 0x67), \ + DEFINE_USAGE(KEY_KPPLUSMINUS, 0x00), \ + DEFINE_USAGE(KEY_KPCOMMA, 0x85), \ + DEFINE_USAGE(KEY_HANGEUL, 0x90), \ + DEFINE_USAGE(KEY_HANJA, 0x91), \ + DEFINE_USAGE(KEY_YEN, 0x89), \ + DEFINE_USAGE(KEY_LEFTMETA, 0xE3), \ + DEFINE_USAGE(KEY_RIGHTMETA, 0xE7) #endif // _XENVKBD_VKBD_H -- 2.5.3 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |