input: optimize a bit for non-shortcut keys, as they are most frequent
parent
f66432e999
commit
0e0fb452a3
|
@ -1764,6 +1764,10 @@ const sc *get_shortcut(int *kbinput)
|
||||||
*kbinput, meta_key ? "TRUE" : "FALSE");
|
*kbinput, meta_key ? "TRUE" : "FALSE");
|
||||||
#endif
|
#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) {
|
for (s = sclist; s != NULL; s = s->next) {
|
||||||
if ((s->menus & currmenu) && *kbinput == s->keycode &&
|
if ((s->menus & currmenu) && *kbinput == s->keycode &&
|
||||||
meta_key == s->meta) {
|
meta_key == s->meta) {
|
||||||
|
|
Loading…
Reference in New Issue