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 #148pull/162/head
parent
535a142ebd
commit
9e85093a6d
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue