Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I use byobu with the tmux backend on my 12.04 server. I'd like to use the midnight commander shortcut keys with it, but the F keys don't work.

I've seen some posts on the issues here:

but they are out of date and don't seem to work for newer versions of byobu. How can I either work around this or use MC in a way that works better?

share|improve this question
Same goes for htop and others. – James Jun 5 '12 at 3:34

3 Answers 3

up vote 31 down vote accepted

You can easily toggle on/off the use of the F-keys inside of Byobu (tmux) by pressing either:

  • shift-F12 (in tmux)

  • ctrl-a-! (in screen)

Full disclosure: I'm the author and maintainer of Byobu.

share|improve this answer
easy and concise. thank you! – logoff May 20 '14 at 14:30
How do you make it off by default, and turn it on as needed? @Dustin-Kirkland – Pykler Nov 6 '14 at 20:52
Got it, add source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux.disable to your .byobu/keybindings.tmux at the end – Pykler Nov 6 '14 at 20:59
not working :P any of this key bindings – QkiZ Feb 10 at 8:56
Dustin, while that works fine for most keys, Shift-Fx seems to be completely ignored by mc when running in Byobu (with Tmux here). I can understand that for shift-F12 (for obvious reasons) – but what do I miss for e.g. Shift-F3 or Shift-F4 (which I frequently need)? – Izzy Mar 15 at 18:56

To trigger F-key press ESC,2 (one after another) instead of F2. Feels more convenient than switching using:

shift-F12 (in tmux)

ctrl-a-! (in screen)

share|improve this answer
This is useful mostly when you use MC inside byobu on Mac OS X, since some F-keys are already used by the system. I find myself using ESC, 9 quite often. – gerlos Feb 5 at 10:26
Any way to extend that to Shift-Fx? Even with Byobu keybindings disabled, Shift-Fx seem to be "blind" (don't work). Tried Esc--Shift-4, no effect. – Izzy Mar 15 at 19:05

Hah, a man after my own heart :)

Short answer: add my ppa (ppa:izx/private) and update byobu (or manually install the deb). Byobu will default to screen as the backend with F-key behavior restored to old 4.x style.

Long answer: Use byobu-select-backend to switch to screen if you haven't already, and add line $BYOBU_PREFIX/share/byobu/keybindings/f-keys.screen.disable after the line $BYOBU_PREFIX/share/byobu/keybindings/f-keys.screen in /usr/share/byobu/keybindings/common.

Entire patch:

+++ byobu-5.17/usr/share/byobu/keybindings/common
@@ -1 +1,3 @@
 source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.screen
+source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.screen.disable
--- byobu-5.17.orig/etc/byobu/backend
+++ byobu-5.17/etc/byobu/backend
@@ -1,4 +1,4 @@
 # BYOBU_BACKEND can currently be "screen" or "tmux"
 # Override this on a per-user basis by editing "$BYOBU_CONFIG_DIR/backend"
 # or by launching either "byobu-screen" or "byobu-tmux" instead of "byobu".
share|improve this answer
But what if we wanted to keep it with tmux? – James Jun 5 '12 at 3:34
@jrg: I'm not that familiar with tmux, sorry -- I tried the new byobu but after this now-fixed bug, switched back to the screen-backend because I'm used to it and happy with it, whatever its limitations. – izx Jun 5 '12 at 4:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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