From 01bd523cee6e70ab0bc2ca1156aafcc180375038 Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Wed, 15 Feb 2023 05:37:24 +0800 Subject: [PATCH] WINGs: allow keypad enter key to validate button This patch allows the keypad enter key to validate the button click action. --- WINGs/wpanel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WINGs/wpanel.c b/WINGs/wpanel.c index c8192658..a0220487 100644 --- a/WINGs/wpanel.c +++ b/WINGs/wpanel.c @@ -25,7 +25,7 @@ static void handleKeyPress(XEvent * event, void *clientData) XLookupString(&event->xkey, NULL, 0, &ksym, NULL); - if (ksym == XK_Return && panel->defBtn) { + if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) { WMPerformButtonClick(panel->defBtn); } else if (ksym == XK_Escape) { if (panel->altBtn || panel->othBtn) { @@ -421,7 +421,7 @@ static void handleKeyPress2(XEvent * event, void *clientData) XLookupString(&event->xkey, NULL, 0, &ksym, NULL); - if (ksym == XK_Return && panel->defBtn) { + if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) { WMPerformButtonClick(panel->defBtn); } else if (ksym == XK_Escape) { if (panel->altBtn) { @@ -709,7 +709,7 @@ static void handleKeyPress3(XEvent * event, void *clientData) XLookupString(&event->xkey, NULL, 0, &ksym, NULL); - if (ksym == XK_Return && panel->defBtn) { + if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) { WMPerformButtonClick(panel->defBtn); } else if (ksym == XK_Escape) { if (panel->altBtn) {