Added some debug code for keypresses. gtkui
authorRyan C. Gordon <icculus@icculus.org>
Wed, 23 Mar 2016 16:47:24 -0400
branchgtkui
changeset 48 5b2b972c5078
parent 47 f22acd5889f3
child 49 2c57a0ad7c8f
Added some debug code for keypresses.
keyhook.c
--- a/keyhook.c	Fri Jan 01 12:48:37 2016 -0500
+++ b/keyhook.c	Wed Mar 23 16:47:24 2016 -0400
@@ -21,9 +21,12 @@
     const xEvent *xev = (const xEvent *) data->data;
     if (data->category == XRecordFromServer)
     {
-        const BYTE keycode = xev->u.u.detail;
         if (xev->u.u.type == KeyPress)
         {
+            const BYTE keycode = xev->u.u.detail;
+
+            //printf("Pressed X11 keycode %u\n", (unsigned int) keycode);
+
             // !!! FIXME: don't hardcode these keycodes.
             if ((keycode == 64) && (keyPressFlags == 0))
                 keyPressFlags++;