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?

  • 3
    Same goes for htop and others.
    – jrg
    Jun 5 '12 at 3:34

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.

  • 1
    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
  • 3
    not working :P any of this key bindings
    – QkiZ
    Feb 10 '15 at 8:56
  • 2
    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 '15 at 18:56
  • 2
    @Dustin: it would be nice to add those short cuts also in the shift-F1 documentation! I was looking for this for a while! Thanks! Dec 6 '15 at 16:36
  • 3
    You could also use byobu-keybindings command, equivalent to those key combinations.
    – Leo
    Nov 17 '17 at 14:15

On midnight commander to trigger for example the F2 key:

  • Press Alt+2 (simultaneously)
  • Press ESC, 2 (one after the other).

Which is more convenient than switching using:

  • Shift+F12 (in tmux, default on byobu)

  • Ctrl+A+! (in screen)

  • 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 '15 at 10:26
  • 1
    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 '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".
  • But what if we wanted to keep it with tmux?
    – jrg
    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.
    – ish
    Jun 5 '12 at 4:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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