I'm running CentOS 6.4 on vagrant and then doing a vagrant SSH into the box. I've been trying to get backspace to work correctly for a while now (as chronicled
here: Centos Terminal Configuring Backspace and Ctrl-h Correctly)
As a part of this, I'm trying to use loadkeys to modify the actions in the keymap - but that doesn't seem to work very well. So, as root, I did the following (as specified here):
[root@localhost vagrant]# dumpkeys -f | grep -iE string
...
string F9 = "\033[20~"
string F10 = "\033[21~"
...
[root@localhost vagrant]# echo 'string F10 = "foo" ' | loadkeys # to make F10 print "foo"
[root@localhost vagrant]# dumpkeys -f | grep -iE string # verify that keymap is changed
...
string F9 = "\033[20~"
string F10 = "foo"
...
Now type F10. This keeps giving me the ~
character instead of printing foo
. This is the original behavior before loadkeys were invoked - so it looks like loadkeys has no effect at all?
tmux
, you can usebind-key -Troot F12 send-keys 'hello '
. But note this will only work from insidetmux
. I'm sure other terminal emulators have similar functionality. – mondaugen Apr 22 '20 at 17:10