Programmatically remap keys in OS X

Is there any way to programmatically remap keys in OS X

Question: Is there any way to programmatically remap keys in OS X?

My Answer:

Most of the text macro tools available on the Mac will be able to trigger scripts (Applescript, shell scripts, etc.) as well as perform standard expansions based on the input and context.

I like to start my expansions with the semi-colon since I know I will rarely accidentally trigger an expansion in my normal typing, and it’s an easy key to hit.

For instance:

  • When I type “;check”, it automatically expands to “✓”
  • ;yen → ¥
  • ;dt → 2014-07-11 (current date)
  • ;email → expands to my email address
  • etc.

These expansions can also call scripts rather than basic substitutions to perform more advanced functions if you’d like. Some popular software options for this are aText, Typinator and TextExpander among many others.