This is a simple program using libxkbcommon to verify that input event keycodes are converted to XKB key symbols. Intended to be used to debug Kodi not mapping keycodes above 255.
Required build tools and libraries.
sudo apt install gcc pkgconf libxkbcommon-dev
nix-shell -p gcc libxkbcommon.dev pkg-config
gcc -o xkb-test xkb-test.c $(pkg-config --cflags --libs xkbcommon)
$ ./xkb-test 358
Event Keycode: 358 (0x166) -> XKB KeySymbol: XF86Info (0x10081166)
Test with unmapped keycode:
$ ./xkb-test 400
Event Keycode: 400 (0x190) -> XKB KeySymbol: NoSymbol (0x00000000)
Test with XKB base
rules that don't support >255 keycodes.
$ XKB_DEFAULT_RULES=base ./xkb-test 358
Event Keycode: 358 (0x166) -> XKB KeySymbol: NoSymbol (0x00000000)