libxkbcommon icon indicating copy to clipboard operation
libxkbcommon copied to clipboard

Efficient storage of keys and levels

Open wismill opened this issue 11 months ago • 2 comments

In #626 I added some bounds to avoid memory issue with big sparse arrays. We surely can do better:

  • Use a hashmap?
  • Use a continuous array, then do binary search at some index (e.g. soon after the X11’s 248 limit)?
  • etc.

wismill avatar Jan 29 '25 16:01 wismill

The array is just so simple and convenient :) My inclination is to stick with it unless someone asks to use some really high keycode or level.

bluetech avatar Jan 30 '25 08:01 bluetech

unless someone asks to use some really high keycode or level.

@bluetech it happened: see #849.

wismill avatar Aug 19 '25 14:08 wismill