15

I'm accessing a linux box with Byobu enabled (with tmux) and I don't seem to be able to use some F-Keys without being binded to Byobu. For example using F6 to sort on htop. I followed this advice, but it doesn't seem to work for me. I press Shift-F2 and then F6 but nothing happens. I'm connecting through PuTTY.

4
  • I have been thinking about this for a few days. Do you REALLY have to use byobu? It is just a convenience wrapper for tmux. If you are familiar enough with tmux you shouldn't need to use byobu, and that will get you at least halfway through your issues. Commented Nov 19, 2012 at 7:33
  • Well, I'm not sure I need to use byobu, but I like to :), mainly because my use is very simple (open/close new windows, cycle through them and use the scroll feature) and also because the status bar is very informative. I guess I could use tmux for most of it, but what about the status bar? Commented Nov 19, 2012 at 11:29
  • I suppose that would be a different question? Commented Nov 19, 2012 at 19:09
  • Can it be that you misread the linked page on askubuntu? You write you tried Shift-F2, but it should have been (and works for me) Shift-F12. Commented Dec 10, 2013 at 15:03

3 Answers 3

11

I needed to do the same thing, found the key documented as Dustin Kirkland had stated, but for me, ctrlb shift-F12. Of course, if you have remapped your bind-key to ctrla then adjust accordingly. The bind-key is not necessary for this to work.

It is a toggle, so you only need to toggle it once with the shift-F12 and then if you need the Byobu function keys back, just press the combination again.

This is only persistent for the life of the session though. I have had to remember to press it again, so it may end up in my 'rc' file.

1
  • This works for me on Ubuntu 12.04.2 when using PuTTY. One very important prerequisite, however, is to make sure you're using the XTerm R6 function key sequences rather than the default Esc[n~ (configure in the Terminal->Keyboard menu). Also, I haven't figured out if there's a way to change it back to the default behavior. Commented Feb 7, 2013 at 5:22
2

I had difficulties with the other solutions. shift-F12 does not disable everything. F6 does still detach the session. Also I seem to have problems to make F12 work in Putty (F1 - F10 are ok). And ctrla-! only works with screen as the backend and not tmux.

Another way is to disable the F-Keys completely in your user's byobu keybindings.

If you are using byobu with tmux, add following at the beginning of ~/.byobu/keybindings.tmux:

source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux.disable

If you are using byobu with screen, add following at the beginning of ~/.byobu/keybindings:

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

NOTE: Look carefully. Depending on your backend, you need to modify a different file.

1

You can toggle Byobu's use of the F-keys on and off by pressing:

ctrla-!

3
  • It doesn't work when connecting from Windows 7 using PuTTY to a Ubuntu 16.04. I try to sort htop with F6, but it will detach instead. Commented Sep 28, 2016 at 15:36
  • @dustin-kirkland For some reason, I can use <kbd>ctrl</kbd><kbd>a</kbd>-<kbd>!</kbd> for deactivating byobu's use of F-keys. But it also kills the other keybindings, including the <kbd>ctrl</kbd><kbd>a</kbd> Escape itself -- so there is no way of getting the F-keys back and no way to navigate between windows or detach. The only way of getting out I found, was exiting each and every window and removing the .byobu config folder to get back to a usable byobu... Commented Apr 9, 2019 at 10:08
  • 1
    This seems only valid if using screen as backend (bug) and with ctrl-a as its keybind. Shift-F12 will Byobu F-keys: DISABLED. Commented Nov 22, 2019 at 16:37

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.