I want to use the terminal multiplexer byobu
, so I need to use the function keys (F1-F12). However, I am accessing a remote machine via SSH, so I need to send function keys over SSH. (I'm running Ubuntu 10.04.4 LTS.)
This answer to this question explains that "Terminals only understand characters, not keys," so I need to use escape sequences to send function keys over SSH. But I'm not sure what are the control characters for F1-F12 on my particular platform. So, I used the command suggested in the answer:
for x in {1..12}; do echo -n "F$x "; tput kf$x | cat -A; echo; done
I get this output:
F1 ^[OP
F2 ^[OQ
F3 ^[OR
F4 ^[OS
F5 ^[Ot
F6 ^[Ou
F7 ^[Ov
F8 ^[Ol
F9 ^[Ow
F10 ^[Ox
F11
F12
This says -- or so it would seem -- that F11 and F12 have no escape sequences associated with them. Have they been stolen by another program, and if so, how can I get them back?