Skip to content

Instantly share code, notes, and snippets.

@jordan-brough
Last active April 9, 2024 16:29
Show Gist options
  • Save jordan-brough/069ff6d33afda08cfc319d401fa164ed to your computer and use it in GitHub Desktop.
Save jordan-brough/069ff6d33afda08cfc319d401fa164ed to your computer and use it in GitHub Desktop.
MacOS checkmark keybinding
// Installation:
// 1. Save this file as /Users/YOUR_USER_NAME_HERE/Library/KeyBindings/DefaultKeyBinding.dict
// 2. Log out and log back in (or just restart any app where you'd like to use the shortcut)
// What: Keyboard shortcut to easily insert checkmarks. (Or whatever text you'd like to insert).
// By default option+v in MacOS inserts a square-root symbol: √
// I've often used option+v as a quick-and-dirty checkmark. This shortcut lets me get a real checkmark.
{
// Insert a checkmark with option+v
"~v" = (insertText:, "✓");
"~l" = (insertText:, "λ"); // another example, the lambda symbol
}
// Source: https://gist.github.com/jordan-brough/069ff6d33afda08cfc319d401fa164ed
// See also:
// - https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/EventOverview/TextDefaultsBindings/TextDefaultsBindings.html
// - https://github.com/ttscoff/KeyBindings
// - https://sbnes.livejournal.com/3725.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment