I am trying to get xdotools
to type a backslash on a German keyboard. After a number of attempts, and a lot of xev
and googling I managed to do it by using
xdotool key 108+20
and now I am trying to generalize the solution a bit - for example for a tilde, which is:
xdotool key 108+35
In doing so I read the output of xmodmap -pke
keycode 20 = ssharp question minus underscore backslash questiondown U1E9E
keycode 35 = plus asterisk bracketright braceright asciitilde macron
keycode 49 = dead_circumflex degree grave asciitilde U2032 U2033
keycode 51 = numbersign apostrophe backslash bar rightsinglequotemark dead_breve
where I notice the fifth item is always the one that I get if I press the AltGr key on the right if the keyboard. The first item is the one without mod keys, and the second is the one with caps on.
What are the others?
According to the Arch Wiki columns in order represent:
ISO_Level3_Shift is indeed mapped to the AltGr key
Mode_switch is the legacy way of doing ISO_Level3_Shift and it is a bit more primitive
In current keyboard layouts Mode_switch is not assigned to any physical key, but you may assign it to one and use it as normal