~metalune/dmenu

1fa4fa386aa7c03f8fa3bf2ffedd78bfe24fe9d4 — Anselm R. Garbe 14 years ago e1515a2
allowing numpad keys as inpyt
1 files changed, 7 insertions(+), 0 deletions(-)

M main.c
M main.c => main.c +7 -0
@@ 216,6 216,13 @@ kpress(XKeyEvent * e) {
	len = strlen(text);
	buf[0] = 0;
	num = XLookupString(e, buf, sizeof buf, &ksym, 0);
	if(IsKeypadKey(ksym)) { 
		if(ksym == XK_KP_Enter) {
			ksym = XK_Return;
		} else if(ksym >= XK_KP_0 && ksym <= XK_KP_9) {
			ksym = (ksym - XK_KP_0) + XK_0;
		}
	}
	if(IsFunctionKey(ksym) || IsKeypadKey(ksym)
			|| IsMiscFunctionKey(ksym) || IsPFKey(ksym)
			|| IsPrivateKeypadKey(ksym))