The man page for keymaps(5) includes this quote:
Here's an example to bind the string "du\ndf\n" to the key AltGr-D. We use the "spare" action code F100 not normally bound to any key.
altgr keycode 32 = F100
string F100 = "du\ndf\n"
I created a file and copy & pasted those two lines, then ran
sudo loadkeys new_keymap
It completed without error, but AltGr-D still (either in Terminal or in LO Writer) printed the same character as before (an accented ‘o’).
What am I doing wrong?
What I’m really trying to do
I have a keyboard with some extra keys. The Mail key opens or restores my email client, Thunderbird – brilliant! I did nothing to configure this key, it worked immediately after I installed Linux Mint 19.1 Cinnamon.
The My Documents key does not work, nothing happens when it is pressed. I would like it to open the file manager (more precisely, to run the command nemo ~/Documents
in Cinnamon).
showkey
reports that Mail is scan code 155, and My Documents is 235.
Having found this answer https://stackoverflow.com/a/4200836/8557840 I created a keymap file containing
keycode 88 = F12
string F12 = "nemo "
but that does not change F12.
Changing the scan code to 235 does not affect the My Documents key.
I need to configure the keyboard.