From b7eb2ae8cd480804e99f6bad9c456a24bafe9c45 Mon Sep 17 00:00:00 2001 From: Antti K Date: Sat, 26 Jul 2014 18:18:46 +0200 Subject: Rebrand to xkbcat Having taken all reasonable measures to reach the author, I'll rename to avoid confusion. --- xspy.c | 136 ----------------------------------------------------------------- 1 file changed, 136 deletions(-) delete mode 100644 xspy.c (limited to 'xspy.c') diff --git a/xspy.c b/xspy.c deleted file mode 100644 index 5025a70..0000000 --- a/xspy.c +++ /dev/null @@ -1,136 +0,0 @@ -// to compile run "gcc -o xspy -lX11 xspy.c" -/* - xspy - Jon A. Maxwell (JAM) - jmaxwell@acm.vt.edu - Monitors keystrokes even the keyboard is grabbed. -*/ - - -/* - xspy polls the keyboard to determine the state of all keys on - the keyboard. By comparing results it determines which key has - been pressed and what modifiers are in use. In this way it - echos to the user all keystrokes typed. - - xspy is freely distributable, provided the source remains intact. -*/ - -#include -#include - -#include -#include -#include -#include - -#define VERSION "1.0c" -#define DEFAULT_DISPLAY ":0" -#define DEFAULT_DELAY 10000 -#define BIT(c, x) ( c[x/8]&(1<<(x%8)) ) -#define TRUE 1 -#define FALSE 0 - -#define KEYSYM_STRLEN 64 - -/* Global variables */ -extern Display *disp; -extern int PrintUp; - -Display *disp; -int PrintUp =FALSE; - -char *KeyCodeToStr(int code, int down); - -int usage() { - printf("%s\n%s\n%s\n%s\n%s%s%s\n", - "USAGE: xspy -display -delay -up", - " Options: display, specifies an X display.", - " delay, determines the polling frequency (.1 sec is 100000 usecs)", - " up, gives up transitions for some keys.", - " Version ",VERSION, ", by JAM"); - exit(0); -} - - - -int main(int argc, char *argv[]) { - char *hostname=DEFAULT_DISPLAY, - *char_ptr, - buf1[32], buf2[32], - *keys, - *saved; - int i, delay=DEFAULT_DELAY; - - /* get args */ - for (i=1; i