xkbcomp: Enable using the whole keycode range
In 502e9e5bff3781cba09f3b33ec030522b549f4e5 we restricted the supported
keycode range in order to avoid memory exhaustion and inefficient storage
in sparse arrays. This solution enabled keycodes up to 0xfff, which
seemed good enough at the time.
However there are huge keycodes in use in the wild, e.g. in WebOS.
So let’s enable the whole keycode range by using 2 methods of storage:
- “Low” keycodes (≤ 0xfff): stored contiguously as before at indexes
[0..num_keys_low); fast O(1) access.
- “High” keycodes (> 0xfff): stored noncontiguously at indexes
[num_keys_low..num_keys); slow access via binary search.