I would recommend `evtest` on Linux. It shows all input devices and lets you select them.
Note keyboard code in platforms/unix/vm-display-fbdev which makes use of /dev/input/event* i.e. sqUnixFBDevKeyboard.c sqUnixEvdevKeycodeMap.c
If you update keyboard input, it would be nice if framebuffer display worked the same.