Skip to content
  • Peter Hutterer's avatar
    XF86keysym.h: reserve a range for Linux kernel keysyms · 5dbb5b76
    Peter Hutterer authored
    The Linux kernel adds a few evdev keycodes roughly every other release. These
    aren't available as keysyms through XKB until they have been added as keycode
    in xkeyboard-config and mapped there to a newly defined keysym in the X11
    proto headers.
    
    In the past, this was done manually,  a suitable keysym was picked at
    random and the mapping updated accordingly. This doesn't scale very well and,
    given we have a large reserved range for XF86 keysyms anyway, can be done
    easier.
    
    Let's reserve the range 0x10081XXX range for a 1:1 mapping of Linux kernel
    codes. That's 4095 values, the kernel currently uses only 767 anyway. The
    lower 3 bytes of keysyms within that range have to match the kernel value to
    make them easy to add and search for. Nothing in X must care about the actual
    keysym value anyway.
    
    Since we expect this to be parsed by other scripts for automatic updating, the
    format of those #defines is quite strict. Add a script to generate keycodes as
    well...
    5dbb5b76