how to bind double tapping the shift key in tmux

Solution 1:

Binding C-S-M won't work for two reasons. Firstly there is no key S-M - M is already shifted. Secondly, there is are no uppercase control keys. See https://github.com/tmux/tmux/wiki/Modifier-Keys#limitations-of-ctrl-keys.

Your best bet for keys that the terminal cannot send are to map them to a key that the terminal can send (like F11 or C-F2) using xbindkeys or similar program.

You don't need to change prefix to make double pressing a key work, you can do it with key tables, for example something like:

bind -Tmytable F11 lsk
bind -Troot F11 switchc -Tmytable