gitlab CI: generate the evdev keycodes (v2)
@svu: best to wait until after the release with this one
The various 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.
- Parse the template for existing defines and alias those keys. e.g. alias = ;
- 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.
Best paired with !172