EDIT: This is Ubuntu 23.04 x64 in the default Ubuntu flavor.
I have upgraded my ancient Model M keyboard to a modern one where Windows keys have been added. Being Danish we use the Alt-Gr key a lot which has been shifted one key to the right and a Windows key is now where my muscle memory goes.
I would like to remap the right Windows key to Alt-Gr (and leave the left Windows key as is. The output from xev
when pressing and releasing the keys is:
KeyPress event, serial 38, synthetic NO, window 0x3800001,
root 0x49d, subw 0x0, time 18696093, (125,74), root:(2722,175),
state 0x10, keycode 134 (keysym 0xffec, Super_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x3800001,
root 0x49d, subw 0x0, time 18696725, (125,74), root:(2722,175),
state 0x50, keycode 134 (keysym 0xffec, Super_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 38, synthetic NO, window 0x3800001,
root 0x49d, subw 0x0, time 18697421, (125,74), root:(2722,175),
state 0x10, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 38, synthetic NO, window 0x3800001,
root 0x49d, subw 0x0, time 18698721, (125,74), root:(2722,175),
state 0x90, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XFilterEvent returns: False
What is the best way to do this remapping? Can the Ubuntu tools help edo this, or do I need to do some low level X11 magic?