keyboard: Prefer lower keycodes

Xwayland can't handle keycodes above 255, so in order to play nice with X11,
we try to use the lowest possible keycode that's applicable for the given
shift level.

Fixes #148
pull/162/head
Andri Yngvason 2022-09-14 21:30:04 +00:00
parent 535a142ebd
commit 9e85093a6d
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ static int compare_symbols(const void* a, const void* b)
const struct table_entry* y = b; const struct table_entry* y = b;
if (x->symbol == y->symbol) if (x->symbol == y->symbol)
return x->level < y->level ? -1 : x->level > y->level; return x->code < y->code ? -1 : x->code > y->code;
return x->symbol < y->symbol ? -1 : x->symbol > y->symbol; return x->symbol < y->symbol ? -1 : x->symbol > y->symbol;
} }