

All macOS keyboard layouts let you access an alternate layer of characters by holding Option. To insert a snippet such as the current date using LaunchBar, I open a LaunchBar window with Command-Space, type date to find the “Current Date (ISO format)” snippet, and press Return to insert it.Īlso note that macOS makes typing special characters easier in general. Your defined snippets are then added to your global list of searcheable items, alongside applications you can open and so on. You define text snippets by putting text files in a certain folder. While its most obvious feature is launching applications, one of its many other features is inserting text snippets. However, for my purposes, I realized that I could insert pieces of text more simply by using another program I was already using: LaunchBar (currently $30). TextExpander implements the direct equivalent to AutoHotkey hotstrings, and is probably the best way to implement short hotstrings like a. I had ddate mapped to the current date, and solang marked to a block of markup I used on Stack Overflow. I used to use TextExpander (currently $40/year) for something like this. For examples, compare these three solutions for working around bad default ⌘C behavior in Books: my simple Keyboard Maestro solution, someone’s straightforward Automator solution, and my shorter, situation-specific Automator solution. If you don’t want to buy Keyboard Maestro, macOS’s built-in Automator (free) can be used in some cases.

One nice thing about KeyboardMaestro is it can record the keystroke, so you don’t have to remember names like “NumpadAdd”. To replicate the Send, part of your script, you would add a Type a Keystroke block to your macro. In this example, whatever your cursor is over would scroll left in addition to the macro being activated. A Device Key trigger responds to a single device input, but sadly, it doesn’t block the input from being passed to the OS. However, to respond to a mouse input like Scroll Wheel Left, you would have to use a Device Key trigger. For example, Shift+Ctrl+S triggers a macro that puts my laptop screen to sleep. Most of my macros have Hot Key triggers, which capture to keyboard shortcuts. Keyboard Maestro’s triggers can associate custom shortcuts with your macros. Each macro can have a number of triggers, most commonly Hot Key triggers. You can also embed shell scripts or AppleScript. In Keyboard Maestro, you define macros using a drag-and-drop scripting language. The closest equivalent to AutoHotkey in general is Keyboard Maestro (currently $36), a proprietary app. Here are the programs I used to do it, and how I could use them to solve your use-cases: AutoHotkey equivalent On macOS, I have managed to set up equivalents to many of AutoHotkey’s features. Yeah, AutoHotkey was great when I was using Windows.
