From: Sander van Dijk Date: Sun, 23 Mar 2008 20:17:35 +0000 (+0100) Subject: cosmetics X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=61976c292bf575859390eeefca087cb60a57ee8b;p=dmenu.git cosmetics --- diff --git a/dmenu.c b/dmenu.c index bc69bcf..4584c07 100644 --- a/dmenu.c +++ b/dmenu.c @@ -353,13 +353,11 @@ 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) { + if(IsKeypadKey(ksym)) + if(ksym == XK_KP_Enter) ksym = XK_Return; - } else if(ksym >= XK_KP_0 && ksym <= XK_KP_9) { + 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))