For a while I have been using the CODE keyboard shortcuts in which you use the Fn
key combined with Insert/Home/PgUp/Delete/End/PgDn in order to control media functions. I would like to do something similar with my old Model M (no media keys, no Meta key, no fancy things to configure).
My initial idea was to use AltGr for those shortcuts. I quickly realized that the Gnome Keyboard Shortcuts don't like AltGr+Thing, I assume that it is because the combination does not trigger anything in the layout I am using (US International with AltGr Dead Keys).
After some googling I assumed that a solution would be to use Xmodmap and do something like the following:
$ xmodmap -e "keycode 112 = Prior NoSymbol Prior NoSymbol XF86AudioRaiseVolume"
But that does nothing. I clearly am doing something wrong (I suppose I have misunderstood some things in the documentation, or not read them well enough). How can I achieve my goal?
Some further debugging information, which may be useful:
The output of the xev
when doing a AltGr + PgUp is the following:
KeyPress event, serial 37, synthetic NO, window 0x5000001,
root 0x6cb, subw 0x0, time 16641710, (2129,943), root:(2349,1147),
state 0x0, 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
KeyPress event, serial 37, synthetic NO, window 0x5000001,
root 0x6cb, subw 0x0, time 16641743, (2129,943), root:(2349,1147),
state 0x80, keycode 112 (keysym 0xff55, Prior), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
I had already done that to check ISO_Level3_Shift (aka AltGr) was being properly detected (and it is). The keycode for the Prior (aka PgUp, number 112) is properly recognized too. I don't know if Xmodmap is misbehaving or if I misconfigured something.