Skip to content
  • Peter Hutterer's avatar
    gitlab CI: generate the evdev keycodes (v2) · 4265882f
    Peter Hutterer authored and Sergey Udaltsov's avatar Sergey Udaltsov committed
    The various <I123> keycodes in keycodes/evdev simply match the kernel
    defines + offset 8. There is no need to maintain these manually, let's
    generate them instead.
    
    Keycodes update rarely and irregularly (on average maybe every second kernel
    release) so there's no need to integrate this into the build itself, let's add
    it to our CI instead.
    
    The script here uses python-libevdev which  has a list of the various key
    codes and their names (compile-time built-in in libevdev itself so it's
    advisable that a recent libevdev is used). The script is hooked up to a custom
    job that will fail if there are key codes with a #define in the kernel that
    are not listed in our evdev file. We allow that job to fail, it's not that
    urgent to block any merge requests.
    
    Changes to v1, see commit 5dc9b48c and its revert 8fa3b314
    
    :
    - Parse the template for existing defines and alias those keys. e.g.
    	alias <I121> = <MUTE>;
    - Kernel v5.10 keycodes are now included in the file
    - The script defaults to the correct template/keycode file, no commandline
      arguments needed for the default run.
    
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    4265882f