all repos — dmenu @ 1fa4fa386aa7c03f8fa3bf2ffedd78bfe24fe9d4

my build of dmenu

allowing numpad keys as inpyt
Anselm R. Garbe arg@suckless.org
Tue, 27 Mar 2007 16:52:50 +0200
commit

1fa4fa386aa7c03f8fa3bf2ffedd78bfe24fe9d4

parent

e1515a2fdcf60987d964b0d616bd44ec3980a89b

1 files changed, 7 insertions(+), 0 deletions(-)

jump to
M main.cmain.c

@@ -216,6 +216,13 @@

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))