Skip to content

Instantly share code, notes, and snippets.

@Ceroce
Created May 1, 2020 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ceroce/f5efb0a7f24a23ac1a67a4d73618dce3 to your computer and use it in GitHub Desktop.
Save Ceroce/f5efb0a7f24a23ac1a67a4d73618dce3 to your computer and use it in GitHub Desktop.
MTMR Preset for a TouchBar with digits, a dot, and square brackets
[
{
"type": "escape",
"width": 30,
"align": "left"
},
{
"title": "1",
"type": "staticButton",
"action": "keyPress",
"keycode": 83, // 0x53
"width": 81
},
{
"title": "2",
"type": "staticButton",
"action": "keyPress",
"keycode": 84, // 0x54
"width": 81
},
{
"title": "3",
"type": "staticButton",
"action": "keyPress",
"keycode": 85, // 0x55
"width": 81
},
{
"title": "4",
"type": "staticButton",
"action": "keyPress",
"keycode": 86, // 0x56
"width": 81
},
{
"title": "5",
"type": "staticButton",
"action": "keyPress",
"keycode": 87, // 0x57
"width": 81
},
{
"title": "6",
"type": "staticButton",
"action": "keyPress",
"keycode": 88, // 0x58
"width": 81
},
{
"title": "7",
"type": "staticButton",
"action": "keyPress",
"keycode": 89, // 0x59
"width": 81
},
{
"title": "8",
"type": "staticButton",
"action": "keyPress",
"keycode": 91, // 0x5b
"width": 81
},
{
"title": "9",
"type": "staticButton",
"action": "keyPress",
"keycode": 92, // 0x5c
"width": 81
},
{
"title": "0",
"type": "staticButton",
"action": "keyPress",
"keycode": 82, // 0x52
"width": 81
},
{
"title": ".",
"type": "staticButton",
"action": "appleScript",
"actionAppleScript": {
"inline": "tell application \"System Events\" to keystroke \";\" using {shift down}\r"
},
"width": 60
},
{
"title": "[",
"type": "staticButton",
"action": "appleScript",
"actionAppleScript": {
"inline": "tell application \"System Events\" to keystroke \"(\" using {option down, shift down}\r"
},
"width": 81
},
{
"title": "]",
"type": "staticButton",
"action": "appleScript",
"actionAppleScript": {
"inline": "tell application \"System Events\" to keystroke \")\" using {option down, shift down}\r"
},
"width": 81
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment