Skip to content

Instantly share code, notes, and snippets.

@zsimic
Created December 13, 2020 04:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zsimic/22f424f18829946a2bc5543b2fc771ae to your computer and use it in GitHub Desktop.
Save zsimic/22f424f18829946a2bc5543b2fc771ae to your computer and use it in GitHub Desktop.
{
"Key Mappings": {
"0x2a-0x200000": {
"Action": 12,
"Text": "*"
},
"0x2b-0x200000": {
"Action": 12,
"Text": "+"
},
"0x2d-0x200000": {
"Action": 12,
"Text": "-"
},
"0x2e-0x200000": {
"Action": 12,
"Text": "."
},
"0x2f-0x200000": {
"Action": 12,
"Text": "/"
},
"0x3-0x200000": {
"Action": 11,
"Text": "0x0A"
},
"0x30-0x200000": {
"Action": 12,
"Text": "0"
},
"0x31-0x200000": {
"Action": 12,
"Text": "1"
},
"0x32-0x200000": {
"Action": 12,
"Text": "2"
},
"0x33-0x200000": {
"Action": 12,
"Text": "3"
},
"0x34-0x200000": {
"Action": 12,
"Text": "4"
},
"0x35-0x200000": {
"Action": 12,
"Text": "5"
},
"0x36-0x200000": {
"Action": 12,
"Text": "6"
},
"0x37-0x200000": {
"Action": 12,
"Text": "7"
},
"0x38-0x200000": {
"Action": 12,
"Text": "8"
},
"0x39-0x200000": {
"Action": 12,
"Text": "9"
},
"0x7f-0x40000": {
"Action": 11,
"Text": "0x17"
},
"0x7f-0x60000": {
"Action": 11,
"Text": "0x1f"
},
"0xf700-0x220000": {
"Action": 10,
"Text": "[1;2A"
},
"0xf700-0x240000": {
"Action": 10,
"Text": "[1;5A"
},
"0xf700-0x260000": {
"Action": 10,
"Text": "[1;6A"
},
"0xf700-0x280000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x41"
},
"0xf700-0x2a0000": {
"Action": 10,
"Text": "[1;4A"
},
"0xf700-0x300000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x41"
},
"0xf700-0x320000": {
"Action": 10,
"Text": "[1;4A"
},
"0xf701-0x220000": {
"Action": 10,
"Text": "[1;2B"
},
"0xf701-0x240000": {
"Action": 10,
"Text": "[1;5B"
},
"0xf701-0x260000": {
"Action": 10,
"Text": "[1;6B"
},
"0xf701-0x280000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x42"
},
"0xf701-0x2a0000": {
"Action": 10,
"Text": "[1;4B"
},
"0xf701-0x300000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x42"
},
"0xf701-0x320000": {
"Action": 10,
"Text": "[1;4B"
},
"0xf702-0x220000": {
"Action": 10,
"Text": "[1;2D"
},
"0xf702-0x240000": {
"Action": 10,
"Text": "[1;5D"
},
"0xf702-0x260000": {
"Action": 10,
"Text": "[1;6D"
},
"0xf702-0x280000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x44"
},
"0xf702-0x2a0000": {
"Action": 10,
"Text": "[1;4D"
},
"0xf702-0x300000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x44"
},
"0xf702-0x320000": {
"Action": 10,
"Text": "[1;4D"
},
"0xf703-0x220000": {
"Action": 10,
"Text": "[1;2C"
},
"0xf703-0x240000": {
"Action": 10,
"Text": "[1;5C"
},
"0xf703-0x260000": {
"Action": 10,
"Text": "[1;6C"
},
"0xf703-0x280000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x43"
},
"0xf703-0x2a0000": {
"Action": 10,
"Text": "[1;4C"
},
"0xf703-0x300000": {
"Action": 11,
"Text": "0x1b 0x1b 0x5b 0x43"
},
"0xf703-0x320000": {
"Action": 10,
"Text": "[1;4C"
},
"0xf704-0x100000": {
"Action": 10,
"Text": "[1;3P"
},
"0xf704-0x120000": {
"Action": 10,
"Text": "[1;4P"
},
"0xf704-0x140000": {
"Action": 10,
"Text": "[1;7P"
},
"0xf704-0x160000": {
"Action": 10,
"Text": "[1;8P"
},
"0xf704-0x20000": {
"Action": 10,
"Text": "[1;2P"
},
"0xf704-0x40000": {
"Action": 10,
"Text": "[1;5P"
},
"0xf704-0x60000": {
"Action": 10,
"Text": "[1;6P"
},
"0xf705-0x100000": {
"Action": 10,
"Text": "[1;3Q"
},
"0xf705-0x120000": {
"Action": 10,
"Text": "[1;4Q"
},
"0xf705-0x140000": {
"Action": 10,
"Text": "[1;7Q"
},
"0xf705-0x160000": {
"Action": 10,
"Text": "[1;8Q"
},
"0xf705-0x20000": {
"Action": 10,
"Text": "[1;2Q"
},
"0xf705-0x40000": {
"Action": 10,
"Text": "[1;5Q"
},
"0xf705-0x60000": {
"Action": 10,
"Text": "[1;6Q"
},
"0xf706-0x100000": {
"Action": 10,
"Text": "[1;3R"
},
"0xf706-0x120000": {
"Action": 10,
"Text": "[1;4R"
},
"0xf706-0x140000": {
"Action": 10,
"Text": "[1;7R"
},
"0xf706-0x160000": {
"Action": 10,
"Text": "[1;8R"
},
"0xf706-0x20000": {
"Action": 10,
"Text": "[1;2R"
},
"0xf706-0x40000": {
"Action": 10,
"Text": "[1;5R"
},
"0xf706-0x60000": {
"Action": 10,
"Text": "[1;6R"
},
"0xf707-0x100000": {
"Action": 10,
"Text": "[1;3S"
},
"0xf707-0x120000": {
"Action": 10,
"Text": "[1;4S"
},
"0xf707-0x140000": {
"Action": 10,
"Text": "[1;7S"
},
"0xf707-0x160000": {
"Action": 10,
"Text": "[1;8S"
},
"0xf707-0x20000": {
"Action": 10,
"Text": "[1;2S"
},
"0xf707-0x40000": {
"Action": 10,
"Text": "[1;5S"
},
"0xf707-0x60000": {
"Action": 10,
"Text": "[1;6S"
},
"0xf708-0x20000": {
"Action": 10,
"Text": "[15;2~"
},
"0xf709-0x20000": {
"Action": 10,
"Text": "[17;2~"
},
"0xf70a-0x20000": {
"Action": 10,
"Text": "[18;2~"
},
"0xf70b-0x20000": {
"Action": 10,
"Text": "[19;2~"
},
"0xf70c-0x20000": {
"Action": 10,
"Text": "[20;2~"
},
"0xf70d-0x20000": {
"Action": 10,
"Text": "[21;2~"
},
"0xf70e-0x20000": {
"Action": 10,
"Text": "[23;2~"
},
"0xf70f-0x20000": {
"Action": 10,
"Text": "[24;2~"
},
"0xf728-0x40000": {
"Action": 11,
"Text": "0xB"
},
"0xf729-0x20000": {
"Action": 10,
"Text": "[1;2H"
},
"0xf729-0x40000": {
"Action": 10,
"Text": "[1;5H"
},
"0xf72b-0x20000": {
"Action": 10,
"Text": "[1;2F"
},
"0xf72b-0x40000": {
"Action": 10,
"Text": "[1;5F"
},
"0xf739-0x0": {
"Action": 13,
"Text": ""
}
},
"Touch Bar Items": {}
}
@zsimic
Copy link
Author

zsimic commented Dec 13, 2020

This can be imported in iTerm2 -> Preferences, either:

  • globally: via Keys -> Key bindings -> Presets -> Import
  • or for a specific profile: via Profile -> your tmux-dedicated profile -> Keys

It makes it so that iTerm passes through key codes that are then properly understood by tmux (similarly to how it would on Linux).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment