From 0e0fb452a314425c4bf4a0b8c618a51b72a7c238 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg <bensberg@telfort.nl> Date: Sun, 17 Dec 2017 12:04:14 +0100 Subject: [PATCH] input: optimize a bit for non-shortcut keys, as they are most frequent --- src/winio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/winio.c b/src/winio.c index b6fd62e7..60ec948c 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1764,6 +1764,10 @@ const sc *get_shortcut(int *kbinput) *kbinput, meta_key ? "TRUE" : "FALSE"); #endif + /* Plain characters cannot be shortcuts, so just skip those. */ + if (!meta_key && (*kbinput & 0x7F) >= 0x20 && *kbinput <= 0xFF) + return NULL; + for (s = sclist; s != NULL; s = s->next) { if ((s->menus & currmenu) && *kbinput == s->keycode && meta_key == s->meta) { -- GitLab