keyhook.c
branchgtkui
changeset 45 cf6a06f368e6
parent 17 e884dbb403cc
child 48 5b2b972c5078
--- a/keyhook.c	Tue Mar 31 20:18:10 2015 -0400
+++ b/keyhook.c	Sat Oct 17 20:24:39 2015 -0400
@@ -1,6 +1,8 @@
 // !!! FIXME: this is X11 specific.  :(
 
 #include <stdio.h>
+
+#if 1
 #include <stdlib.h>
 #include <string.h>
 #include <pthread.h>
@@ -130,5 +132,21 @@
     return sawKeyCombo;
 } // pumpKeyHook
 
+#else
+
+int initKeyHook(void) { return 1; }
+void deinitKeyHook(void) {}
+
+int pumpKeyHook(void)
+{
+static int x = 50;
+const int retval = (x == 50);
+if (++x > 50) x = 0;
+if (retval) printf("fire it!\n");
+return retval;
+}
+
+#endif
+
 // end of keyhook.c ...