Search code examples
terminalkeyboard-shortcutstmux

Change Tmux default shortcut to switch between sessions


The current shortcut is Prefix ) and Prefix ( to switch between sessions.

I want to change it to Ctrl PageUp/PageDown, but I don't know what command should be executed when I pressed these keys.

I didn't find any command to override these default prefixes.


Solution

  • The command is switch-client with -n (next) and -p (previous) options.

    bind -n C-PageUp switch-client -p
    bind -n C-PageDown switch-client -n