How to Change tmux Prefix to Ctrl+Space on macOS

How to Change tmux Prefix to Ctrl+Space on macOS

The default prefix in tmux is ctrl+b .

Let’s accept it. Using ctrl+b time and again is a pain in your wrist. It’s time to solve this issue.

  1. Make your caps lock key to act as ctrl key.

    Go to System Preferences > Keyboard . Under the Keyboard tab click on Modifier Keys... button at the bottom right.

    Map the Caps Lock Key to ^Control

    Click OK

  2. Open ~/.tmux.conf in your default text editor and add these:

     # Send prefix
     unbind-key C-b
     set-option -g prefix C-Space
     bind-key C-Space send-prefix
    

    The above command sets the default prefix to ctrl+space .