[Vm-dev] INFO REQUEST: key & mouse state machine / API

ken.dickey at whidbey.com ken.dickey at whidbey.com
Fri Dec 27 18:28:10 UTC 2019

OK. What I am gleaning is that I should map from

#define KEY_L                   38
#define KEY_PAGEDOWN           109


#define XK_L               0x004c  /* U+004C LATIN CAPITAL LETTER L */
#define XK_l               0x006c  /* U+006C LATIN SMALL LETTER L */
#define XK_Page_Down       0xff56

  L -> 0x004C
  l -> 0x006C
  page down -> 0x21DF

   recordKeyboardEvent(int keyCode, int pressCode, int modifiers, int 

When I see Key: (38 = x26)  'l'
-> recordKeyboardEvent( 0x006c, EventKeyChar, 0, 0x006c)

when I see Key: (38 = x26) + Shift  'L'
-> recordKeyboardEvent( 0x004c, EventKeyChar, ShiftKeyBit, 0x004c)

When I see Key: (109=0x6d) KEY_PAGEDOWN -> XK_Page_Down = 0xFF56
-> recordKeyboardEvent( 0xFF56, EventKeyUp, 0, 0x21DF)

Is this close to right?

Thanks much,

More information about the Vm-dev mailing list