11

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.

Troy Alford
  • 26,660
  • 10
  • 64
  • 82
cucurbit
  • 1,422
  • 1
  • 13
  • 32

2 Answers2

12

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

Community
  • 1
  • 1
Eric Lavoie
  • 5,121
  • 3
  • 32
  • 49
2

If the Function and other keys are bound to some other program, they won't work. Also, on some OS e.g CentOS, the keys (and their combinations) cease to function.

My solution is to use the bind-key which is Ctrl a to perform different actions. Here are a list of few important shortcuts with bind-key

Help
$ Ctrl-a ?

Create new window
$ Ctrl-a c

Horizontal split
$ Ctrl-a |     #Shift + \ = |

Vertical split
$ Ctrl-a %

Rename windows
$ Ctrl-a ,

Move window
$ Ctrl-a .

To move between splits (tested on RHEL)
$ Ctrl-a (arrow-keys)

NOTE: Tested on RHEL/CentOS

Junaid
  • 3,477
  • 1
  • 24
  • 24