Remapping keyboard without firmware modification (adding SysRq key)

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.

  1. sudo apt install keyd

  2. Make a file /etc/keyd/default.conf with these contents:

    [ids]
    *
    
    [main]
    rightalt = rightshift
    
  3. 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.