I'm using Linux Mint, I set a hot key that ` will open a new terminal window. But now I found that when writing markdown, I need this key. How could I map ~ to `?
2 Answers
You can map keys using xbindkeys :
sudo apt-get install xbindkeys
# write default configuration
xbindkeys --defaults > /home/jylam/.xbindkeysrc
You can then edit ~/.xbindkeysrc to add you own bindings, or install xbindkeys-config as well to use the graphical editor.
I strongly suggest NOT to use ~ as a shortcut, as it represents your home directory (~/). Use modifiers, like ctrl or alt.
-
I try to use xbindkeys-config to do the config, but I don't know how to write the action "enter ` for me"?– wong2Dec 14, 2011 at 7:16
-
1You can know the name of a key using 'xbindkeys -k' ; "enter" is Mod2 + Return here, for instance.– RavacholDec 14, 2011 at 9:35
-
I want to bind ctrl + grave key to enter the grave key, how to write the .xbindkeysrc?– wong2Dec 14, 2011 at 11:54
I use an application called Guake for this. Instead of opening up a terminal window, it has a persistent drop-down terminal that appears when you press the hotkey. By default it is set to F12, but it can be changed to other keys. When I first started using it, I set it to `, but found that didn't work very well, because, as Ravachol said, you use that key for other things.