Commit 0e0fb452 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

input: optimize a bit for non-shortcut keys, as they are most frequent

No related merge requests found
Showing with 4 additions and 0 deletions
+4 -0
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment