8

They just don't work. I don't even know where to begin, what information to even give here, etc. Can anyone help me make the default keybindings work?

When I do Ctrl + a then Shift + /, it lists keybindings, which don't match what the config files point to (f-keys.tmux). I am so fed up with this. Can anyone help? All I want to do is to be able to search for the keybindings on the net, and be able to apply them. If I do Ctrl + a then Shift + f2, nothing happens. If I do just Shift + F2, nothing happens. It should be splitting the pane!

I am using Putty.

Pablo Bianchi
  • 15,657
timramich
  • 103
  • 1
  • 5
  • If I'm not mistaken, byobu uses tmux key bindings. Splitting windows for me works with Ctrl+a v for vertical and Ctrl+a h for horizontal split. – Sergiy Kolodyazhnyy Aug 15 '15 at 23:16
  • 1
    @Serg it gives you a choice the first time you press Ctrl-a. – muru Aug 17 '15 at 22:38
  • @muru yes, that's right. So user can define which keybinding to use on the first try. Thanks for pointing that out – Sergiy Kolodyazhnyy Aug 18 '15 at 00:18
  • You can temporary toggle on/off Byobu's keybindings and use showkey -a to check if they reach the terminal. Ctrl+d (EOT) to exit. Also maybe useful: dconf dump /org/gnome/desktop/wm/keybindings/ | grep -v disabled and gnome-control-center keyboard. – Pablo Bianchi Jun 08 '19 at 23:44
  • @PabloBianchi I love Byobu, but mc (Midnight Commander) is my main way to interact with Linux, and it uses Fn keys for basic operations (file edit, file save etc). I noticed that "Fn" keys all have alternative controls as well (e.g. F3/F4 is Alt-Left/Alt-Right). Is it possible to disable only "Fn" bindings, so they don't interfere with mc? – StanTastic Dec 06 '21 at 14:21
  • @StanTastic From here: To use fn keys on Midnight Commander use Alt+Nº or Shift+F12 to disable byobu F-keys. – Pablo Bianchi Dec 06 '21 at 15:25
  • Yes, I know, but Shift-F12 disables ALL bindings, not just Fn, which is hugely inconvenient (Alt-Left, Shift-F12, F4, type, F2, Shift-F12, Alt-Right...). I have 35 years of muscle memory that says "Save file is F2" (and when it does nothing, it's Esc-2, but in case of Byobu it actually does something), guess where it lands me if I'm using Byobu :) I press the key even before I think about it. I never looked it up, but maybe I can just delete all straight Fn bindings from the config... – StanTastic Dec 07 '21 at 16:24

2 Answers2

17

Byobu's keybindings are guaranteed to work perfectly in Ubuntu with gnome-terminal.

Other terminals in Ubuntu, like Terminator, xterm, konsole, etc, should work fairly well, but might lack some features only found in gnome-terminal.

Other OSes (Windows, Mac), and with other terminals (iTerm2, Putty) are very difficult to support, and may or may not work well.

You can find a ~10 minute long "getting started" video at https://www.byobu.org/ which will walk you through the most common Byobu workflows and keybindings.

Also, you can press Shift-F1 any time in Byobu to bring up a screen of key binding hints. I'll copy and paste those here for you, in case Shift-F1 isn't working for you:

Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:

  F1                             * Used by X11 *
    Shift-F1                     Display this help
  F2                             Create a new window
    Shift-F2                     Create a horizontal split
    Ctrl-F2                      Create a vertical split
    Ctrl-Shift-F2                Create a new session
  F3/F4                          Move focus among windows
    Alt-Left/Right               Move focus among windows
    Alt-Up/Down                  Move focus among sessions
    Shift-Left/Right/Up/Down     Move focus among splits
    Shift-F3/F4                  Move focus among splits
    Ctrl-F3/F4                   Move a split
    Ctrl-Shift-F3/F4             Move a window
    Shift-Alt-Left/Right/Up/Down Resize a split
  F5                             Reload profile, refresh status
    Alt-F5                       Toggle UTF-8 support, refresh status
    Shift-F5                     Toggle through status lines
    Ctrl-F5                      Reconnect ssh/gpg/dbus sockets
    Ctrl-Shift-F5                Change status bar's color randomly
  F6                             Detach session and then logout
    Shift-F6                     Detach session and do not logout
    Alt-F6                       Detach all clients but yourself
    Ctrl-F6                      Kill split in focus
  F7                             Enter scrollback history
    Alt-PageUp/PageDown          Enter and move through scrollback
    Shift-F7                     Save history to $BYOBU_RUN_DIR/printscreen
  F8                             Rename the current window
    Ctrl-F8                      Rename the current session
    Shift-F8                     Toggle through split arrangements
    Alt-Shift-F8                 Restore a split-pane layout
    Ctrl-Shift-F8                Save the current split-pane layout
  F9                             Launch byobu-config window
    Ctrl-F9                      Enter command and run in all windows
    Shift-F9                     Enter command and run in all splits
    Alt-F9                       Toggle sending keyboard input to all splits
  F10                            * Used by X11 *
  F11                            * Used by X11 *
    Alt-F11                      Expand split to a full window
    Shift-F11                    Zoom into a split, zoom out of a split
    Ctrl-F11                     Join window into a vertical split
  F12                            Escape sequence
    Shift-F12                    Toggle on/off Byobu's keybindings
    Alt-F12                      Toggle on/off Byobu's mouse support
    Ctrl-Shift-F12               Mondrian squares
/usr/share/doc/byobu/help.tmux.txt (END)

Full disclosure: I am the author and maintainer of Byobu.

Pablo Bianchi
  • 15,657
  • Thanks. Should I expect Byobu's keybindings to work great out-of-the-box with a default login terminal (non-GUI) with Ubuntu Server? (They don't work for me.) Would you be open to a bug report on this? – David J. Sep 21 '16 at 19:36
  • As in a tty console? If so, only somewhat. The keyboard map in the tty is very, very weak. – Dustin Kirkland Sep 22 '16 at 13:35
0

The only time I've had byobu keybindings not work was when there was another program grabbing those keys first. I think, for example, your shift+f2 keypresses are being grabbed by your desktop environment instead of byobu. I'm assuming they're mapped already to something else in your DE.

hlmtre
  • 101
  • 5
  • If I press shift+f2 it makes a tilde on the shell I'm trying to manipulate...so I don't think that's it. – timramich Aug 15 '15 at 21:59
  • If you're on a laptop, try pressing function at the same time. My function keys double as hardware controls, and pressing Fn alternates their function. – hlmtre Aug 15 '15 at 22:01
  • 1
    I'm on a desktop with a plain old keyboard. Certain F-keys work. My issue is that the keybindings are all screwed up and not at all what is listed in f-keys.tmux. – timramich Aug 15 '15 at 22:02
  • If I do ctrl+f2 it creates a new window, like it's ignoring the ctrl. Ctrl+a works as an escape sequence, so I don't know what's going on here. – timramich Aug 15 '15 at 22:03
  • ctrl+a works as an escape sequence in tmux. Your desktop environment doesn't see it as an escape sequence. Do you know if you're running Gnome or Unity?

    You can probably unbind all the function keys in your desktop environment. I would do that to make sure they're being sent completely vanilla to tmux.

    – hlmtre Aug 15 '15 at 22:07
  • I'm on Windows, and using putty. Keys are making it to this shell. If I press ctrl+f2, it makes a new window under byobu. If I press shift+f2 it makes a tilde in the running shell under putty. I have putty's function keys set as Xterm R6. And as I said before, if I list the keybindings, they don't reflect AT ALL what is in the f-keys.tmux file. – timramich Aug 15 '15 at 22:10
  • Then Windows is grabbing that keybinding. See http://askubuntu.com/questions/179368/shiftf2-is-ignored-when-using-byobu-with-putty-windows-7

    You're close, in that you have putty set correctly (xterm R6) but you've got to find a way to prevent Windows from grabbing those keys; instead it must send the keypresses unmodified straight through.

    – hlmtre Aug 15 '15 at 22:11
  • Yeah, except it's not, because I get something in the shell. Something would happen in Windows if such an action was assigned to that combination of keys. And as I've said multiple times, and to me seems very important, when I list the keybindings that are actually loaded, they do not match the f-keys.tmux file that should be being loaded. – timramich Aug 15 '15 at 22:15