changeset: 193:47f5b635fdcf
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Tue Mar 27 16:52:50 2007 +0200
summary: allowing numpad keys as inpyt
diff -r a9013d97d142 -r 47f5b635fdcf main.c
--- a/main.c Wed Mar 07 13:30:57 2007 +0100
+++ b/main.c Tue Mar 27 16:52:50 2007 +0200
@@ -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))
Received on Tue Mar 27 2007 - 16:57:05 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:28 UTC