Having recently setup a MacMini M1 as an iOS development device I came across a tiny issue based on my personal tmux configuration which was made on a linux machine and didn’t quite work out of the box on MacOS Big Sur (not sure about older versions).
As a lover of TMUX one of the first things I do is remap the default TMUX prefix from CTRL+B to CTRL+SPACE – mainly because I can strike that combination easier with one hand.
Anyway. The configuration looks like this:
unbind C-b set-option -g prefix C-Space bind-key C-Space send-prefix
And there is absolutely nothing wrong with that configuration!
However it turns out that if you have multiple “Input Sources” (System Preferences -> Keyboard -> Input Sources) by default MacOS uses the keyboard shortcut CTRL+Space to allow you to quickly change to the previous input source.
To fix all you need to do is navigate to the “Input Sources” section of the “Shortcuts” Keyboard preferences and uncheck (or change!) that shortcut.
You can actually see this override in action if you try the following:
Type `cat -v` into a terminal window.
Press the CTRL+Space keybind and if the OS input source shortcut is on and overriding you will not see any output.
However if you disable the shortcut and try again you will see the keybinding “getting through” and escaping the OS override.
That’s it. If you have the `.tmux.conf` setting at the top of this post but your CTRL+Space keybind prefix for TMUX isn’t working then this might be your problem.
Thanks to this comment on this github issue for helping me solve this one!