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.


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.


In my ~/.zshrc

bindkey '^[[1;5D' backward-word
bindkey '^[[1;5C' forward-word

... And now ctrl+left / right jump words in byobu / tmux.

  • That's a useful trick. I guess it only works for zsh shells. Personally, I'm using zsh locally, but bash everywhere else.
    – chmac
    Feb 20 '14 at 10:22

The reason for the change is because now Byobu is using tmux as the backend, instead of screen.

CTRL-Left & CTRL-Right are used in tmux for navigating panes, so we have to tell tmux not to do this! Just edit your ~/.byobu/keybindings.tmux and add the following lines to the end:

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

Just log out/back in and you should see the change.

*Note, this will only work for xterm, not for the actual ttys. You will notice that even without using byobu, ctrl-left and ctrl-right do not behave as expected from a tty. Ubuntu seems to ignore /etc/inputrc when using a tty for some reason.

  • 2
    I tried that, but then ctrl-left/right only moves one character at a time, not a whole word.
    – chmac
    Jun 1 '12 at 19:41
  • I can confirm @chmac's solution.
    – jrg
    Jun 1 '12 at 19:56
  • 2
    good answer, but it didn't work for me without the .tmux.conf changes
    – Brenden
    Nov 9 '13 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.