about summary refs log tree commit diff stats
path: root/key.c
diff options
context:
space:
mode:
Diffstat (limited to 'key.c')
-rw-r--r--key.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/key.c b/key.c
deleted file mode 100644
index 7caae15..0000000
--- a/key.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
- * See LICENSE file for license details.
- */
-
-#include "wm.h"
-
-#include <X11/keysym.h>
-
-static const char *term[] = { 
-	"xterm", "-u8", "-bg", "black", "-fg", "white", "-fn",
-	"-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*", 0 
-};
-
-static const char *proglist[] = {
-		"sh", "-c", "exec `ls -lL /bin /sbin /usr/bin /usr/local/bin 2>/dev/null | awk 'NF>2 && $1 ~ /^[^d].*x/ {print $NF}' | sort | uniq | gridmenu`", 0
-};
-
-static Key key[] = {
-	{ Mod1Mask, XK_Return, run, term },
-	{ Mod1Mask, XK_p, run, proglist }, 
-	{ Mod1Mask | ShiftMask, XK_c, kill, NULL}, 
-	{ Mod1Mask | ShiftMask, XK_q, quit, NULL},
-};
-
-void
-update_keys()
-{
-	unsigned int i, len;
-	KeyCode code;
-
-	len = sizeof(key) / sizeof(key[0]);
-	for(i = 0; i < len; i++) {
-		code = XKeysymToKeycode(dpy, key[i].keysym);
-		XUngrabKey(dpy, code, key[i].mod, root);
-		XGrabKey(dpy, code, key[i].mod, root, True, GrabModeAsync, GrabModeAsync);
-	}
-}
-
-void
-keypress(XEvent *e)
-{
-	XKeyEvent *ev = &e->xkey;
-	unsigned int i, len;
-	KeySym keysym;
-
-	keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
-	len = sizeof(key) / sizeof(key[0]);
-	for(i = 0; i < len; i++)
-		if((keysym == key[i].keysym) && (key[i].mod == ev->state)) {
-			if(key[i].func)
-				key[i].func(key[i].aux);
-			return;
-		}
-}
ght .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#ifndef LYCHARVALS_H
#define LYCHARVALS_H 1

#ifndef HTUTILS_H
#include <HTUtils.h>
#endif

/*
 * Use integer values for character constants rather than '\octal' form, since
 * not all compilers agree that those will fit in a character, even when cast.
 */
#ifndef   CH_ESC
#ifdef    EBCDIC
#define CH_DEL           0x07
#define CH_ESC           0x27
#define CH_ESC_PAR       0x27
#define CH_HICTL         0x3f
#define CH_NBSP          0x41
#define CH_SHY           0xca
#define LYCharINTERRUPT1 0x03	/* Control-C */
#define LYCharINTERRUPT2 0x2f	/* Control-G */
#else /* EBCDIC */
#define CH_ESC           0033
#define CH_DEL           0177
#define CH_ESC_PAR       0233
#define CH_HICTL         0237
#define CH_NBSP          0240
#define CH_SHY           0255
#define LYCharINTERRUPT1 0003	/* Control-C */
#define LYCharINTERRUPT2 0007	/* Control-G */
#endif /* EBCDIC */
#endif /* CH_ESC */

#endif /* LYCHARVALS_H */