When starting a session to, in my case at least, debian and Ubuntu machines with Putty from a Windows machine, alt-left/right
works as moving per word on the command-line. (Often this is also achieved on Linux systems with ctr-left/right
).
However, once I started using Byobu, and set Byobu to start automatically (using the F9 menu), the alt-left/right
doesn't work anymore. Instead when outputting the raw characters using Ctrl-V
it shows,
^[[1;3C
— when sending alt-right
. Whereas, when byobu is not started automatically when logging in, but is started manually once logged in, I deduced that it sends,
^[^[[C
Which is caught by a default inputrc config, and consequently it is translated to move by word.
What mechanism between Putty, the host/terminal/byobu is in play, to make make this difference in received commands?
Best Answer
byobu is just a wrapper around tmux, which is responsible for the behavior you're seeing. tmux is attempting to translate "keys" into the character sequence that xterm would encode modified special keys. In the manual, that's documented:
though in new/recent versions, reportedly the default is on. That exposed a problem, seen in this commit-message: