09 Mar 2025
It’s a pain to do global keyboard shortcuts on mac; here’s how I set one up to create a new note in Simplenote.
be inspired by my script to activate the Simplenote app, and select its “New” menu item from the “Note” menu:
tell application "Simplenote"
activate
tell application "System Events"
tell application process "Simplenote"
tell menu bar 1
tell menu bar item "Note"
tell menu "Note"
click menu item "New"
end tell
end tell
end tell
end tell
end tell
end tell
be inspired by mapping my script above to command-J
{
"description": "New note",
"manipulators": [
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": ["command"],
"optional": ["any"]
}
},
"to": [{ "shell_command": "open -a 'New note'" }],
"type": "basic"
}
]
}
See the Karabiner modifiers documentation.