Modify Key-Bindings in Byobu

cucurbit picture cucurbit · Jun 13, 2014 · Viewed 8k times · Source

I have recently installed byobu terminal multiplexer, and I found that I am not able to move in a fast way through the terminal. In linux you can do: Control+Arrows (Left/Right). I want to find the same but in byobu.

And I would like to configure it, in order to be able to use Ctrl+Left and Ctrl+Right if it's possible, not other combinations.

Any idea?

I have tried already this: How to make byobu forward-word and backward-word with CTRL+arrow? But is not working for me. Ubuntu 13.10

Thanks in advance.

Answer

Eric Lavoie picture Eric Lavoie · Jun 16, 2014

One way to change your key bindings is to edit /usr/share/byobu/keybindings/f-keys.tmux (or edit ~/.byobu/keybindings.tmux).

You will find these lines :

bind-key -n M-Left previous-window
bind-key -n M-Right next-window

M is for Meta, aka the ALT key. Example. Change the lines for :

bind-key -n C-Left previous-window
bind-key -n C-Right next-window

C for Ctrl key (and S for Shift key).

Save, quit, press F5 to reload profile.

Refs : Bybobu doc, Byobu-and-mc, keybindings-in-byobu-using-tmux-backend, tmux