How To Change Tmux Prefix Keymap In Iterm2

My computer develop environment

$ sw_vers 
ProductName: Mac OS X
ProductVersion: 10.12.3

$ tmux -V
tmux 2.8

$ Iterm2
Build 3.2.5

Default Prefix Key is Ctrl + B. I think it is too hard to press this combination button before next command.
Can i change the prefix key ?
According to the official document, the solution is inseparable from the Ctrl button. It means that Ctrl must be one of the prefix key.

But fortunately under mac, if you are using Iterm instead of system terminal, you can customize the key combination to mapping tmux ‘s prefix through by Hex Code

Configuration In Item2:

Preferences -> Profiles -> Keys

Add A new Key Mapping

The Action choose Send Hex Code
After recording the keyboard shortcut. You can set the mapping shortcut by hex code.
The key Ctrl b ‘s hex code is 0x02.
The next things becomes simpler.
Let me give an example. If you want to achieve the effect to mapping Ctrl B + w, you can entry the hex code 0x02 0x77

Here i have search a example picture, you can compare it to get more information to build your own unique shortcut!
Example Keys

More Hex Code

You can check this ASCII Mapping Keyboard Table to look for the hex code which you need.

# Iterm, Mac, tmux

Thank you for reading.
This post is copyrighted by Liyuliang’s Blog.
If reproduced, please indicate the source: Liyuliang’s Blog
This blog uses Creative Commons Attribution-NonCommercial-Share-Sharing 4.0 International License Agreement to license.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now