I have a graphics tablet, that acts as two USB devices on Ubuntu 20.04. One pointing device and one keyboard device for the hardware buttons. (The tablet does not use the wacom driver, so I cannot use the usual graphics tablet utilities)
The keyboard driver sends Shortcuts like Ctrl-z
, and maybe also own keycodes for it. I would like to remap the buttons to other shortcuts. Is there a way to capture the keys from only one specific keyboard and remap them under X11?
Xmodmap and similar configuration files and tools seem to apply to all keyboards, but I wonder if there are options for per-device configuration. A tool that captures keys from the keyboard device and then sends the new shortcut to the active window would also be an acceptable solution for me.
I am looking for general advice that works for USB keyboards (and does not need to be tested with anything else than a standard USB keyboard). I will adapt it to my use-case myself to avoid making this question overly specific.