I also wanted to remap AltGr to shift on my Pocket Reform. Using hwdb and udev also didn’t work for me. To add more detail to that, I was able to remap several other keys to shift, for example I could turn 1 or x into a shift key – not very useful, but an interesting test. But for some reason I couldn’t remap AltGr to anything.
@henesy 's suggestion of evremap probably would have worked fine for me, but I picked keyd, which is also works on the Linux console, not just graphical environments.
-
sudo apt install keyd -
Make a file
/etc/keyd/default.confwith these contents:[ids] * [main] rightalt = rightshift -
sudo systemctl enable --now keyd
After that it immediately started working. A future improvement I could make to my config is to use the specific ID of the Pocket Reform keyboard instead of * so that plugged in keyboards aren’t also remapped.