Ubuntu – How to get Ctrl+Left / Ctrl+Right to jump a word again in byobu

byobushortcut-keysvirtual-console

On my Ubuntu 11.10 machines running byobu 4.37 I can use the key combination Ctrl+ / Ctrl+ to jump a word at a time in the terminal. However, on my Ubuntu 12.04 machines with byobu 5.17 this no longer works.

I've read that byobu has remapped those key combinations to resize splits, and now Alt+ and Alt+ have the desired effect. However, I'm unable to find where Alt+ and Alt+ are mapped, in order to remap Ctrl+ and Ctrl+. If I unmap the key bindings for Ctrl+ and Ctrl+, then the cursor moves only 1 character at a time, not 1 word at a time.

Best Answer

One solution was to switch the backend to screen. However, I had recurring issues with ctrl-right when I did that. To do that change ~/.byobu/backend to BYOBU_BACKEND=screen.

I subsequently found a much better solution using tmux from this bug. Create ~/.byobu/.tmux.conf with this value:

set-window-option -g xterm-keys on

Then ~/.byobu/keybindings.tmux with:

unbind-key -n C-Left
unbind-key -n C-Right

Now ctrl-left and ctrl-right jump one word at a time in tmux.

Related Question