35

I was using byobu on Ubuntu 11.10 Server and I needed to hit a function key in an app, so I hit F9 to bring up the config menu and switched the keybinding set from "f-keys" to "screen-escape-keys". That worked, but now I can't re-enable all the f-keys.

I found a program byobu-config that brings up the menu again, and I can switch back to screen keys from there. This fixes things for new screen processes, but the effect on the current screen session is weird: it disables the Ctrl+a (screen) keys and restores F2-F8, but F9-F12 still don't do anything (they're just passed on to the foreground process).

What's up with this? Any ideas? Thanks in advance.

Pablo Bianchi
  • 15,657
xyzzyrz
  • 886

5 Answers5

56

Note: This only works if you're using Byobu with tmux as the back-end. See other answers for Byobu with screen as the back-end.


Just press Shift+F12 To toggle F-keys on and off.

Example : Launch htop (within a Byobu pane of course) then enter Shift+F12, then if you press F3 you will search in htop processes, not switch to the left Byobu window/pane.

Related question with answer also for screen.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
yPhil
  • 1,557
  • 14
  • 25
14

You can also toggle between the f-keys bindings and the screen-escape-keys bindings using:

ctrl-a-!
  • 2
    Here this displays the message "can't break with only one pane" are you sure of this shortcut ? – yPhil Oct 01 '12 at 08:42
  • 4
    That only works in byobu-screen, not in byobu-tmux (https://bugs.launchpad.net/byobu/+bug/386363). In the latter the correct combination is SHIFT-F12. – invernizzi Nov 28 '12 at 20:40
  • This does work on Ubuntu 12.04.1 (NOTE: answer SHIFT-F12 does not work) – zipizap Jan 09 '13 at 15:03
  • 1
    Note that this will also reset your meta/escape key, probably because it just sources /usr/share/byobu/keybindings/f-keys.screen.disable which has the line escape ^Aa. If you for example used 't' as your escape key you can set it again by hitting ctrl-a and then :escape ^Tt. – Perseids Feb 15 '14 at 10:29
4

We can attempt to debug your particular problem, however it would be much easier to just clean out your Byobu configuration and start clean:

rm -rf ~/.byobu

On 11.04, you'll also need to remove the folder this symlink points to:

rm -rf ~/.local/share/byobu

And then start byobu.

2

In case any of the key combinations from the other answers did not work, just try this equivalent command inside Byobu:

byobu-keybindings
Leo
  • 3,654
  • 2
  • 20
  • 36
1

Make your ~/.byobu/keybindings look like this:

# source $BYOBU_PREFIX/share/byobu/keybindings/common
. /usr/share/byobu/keybindings/f-keys.screen.disable

and select screen as byobu's back-end via byobu-select-backend. That works in Debian, at least.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
user156504
  • 11
  • 1