Set up keyboard shortcuts that type out stuff on Mac

Augusts Bautra - Nov 10 '22 - - Dev Community

2023 - It's actually possible to have arbitrary keyboard shortcuts that type out stuff like binding.pry on vanilla Mac. The setup is tricky, but no more than 10 mins.

  1. Set up a Quick Action via Automator.
  2. Tie the action to a shortcut (also in that SO thread)
  3. Allow VSC (or chrome, terminal, whatever) to send keystrokes by adding it to a11y as per the last line of this SO answer. This needs to only be done once, for the first such keystroke sender.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .