X-Git-Url: https://git.xinqibao.xyz/dmenu.git/blobdiff_plain/f555908cef580106a50c53e096ec12bf4d2bb2e2..0e19146d5f89def3a1cf55545fdc72dbab7b60e3:/main.c diff --git a/main.c b/main.c index fa03ec8..c63ac08 100644 --- a/main.c +++ b/main.c @@ -1,7 +1,6 @@ -/* (C)opyright MMVI-MMVII Anselm R. Garbe - * (C)opyright MMVI-MMVII Sander van Dijk - * See LICENSE file for license details. - */ +/* © 2006-2007 Anselm R. Garbe + * © 2006-2007 Sander van Dijk + * See LICENSE file for license details. */ #include "dmenu.h" #include #include @@ -216,6 +215,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)) @@ -451,7 +457,7 @@ main(int argc, char *argv[]) { if(++i < argc) selfg = argv[i]; } else if(!strncmp(argv[i], "-v", 3)) - eprint("dmenu-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n"); + eprint("dmenu-"VERSION", © 2006-2007 Anselm R. Garbe, Sander van Dijk\n"); else usage(); setlocale(LC_CTYPE, "");