Keyboard shortcut with delete in it

Discussion in 'OS X Mavericks (10.9)' started by Bradf0rd91, Apr 12, 2014.

  1. Bradf0rd91 macrumors newbie

    Mar 27, 2012
    I would like to create a keyboard shortcut that replaces a word, say "like", with the following: ", like". By that, I mean the first step of the shortcut should delete the previous character (which would be a space) and then replace with other content. How can I inject an ASCII character into a keyboard shortcut (if it's possible)?
  2. FreakinEurekan macrumors 68040


    Sep 8, 2011
    Eureka Springs, Arkansas
    Feels like I'm spamming because I've mentioned the same app in 2 consecutive posts, I promise I don't work for them or get any benefit!

    That said, I use TextExpander rather than the built-in replacements in OS X. I have a couple of my "snippets" that I want a similar result, eliminating a leading space. The way I've done it is to include the leading space in my key sequence, e.g. "{space}like" is replaced by ", like". OS X's built-in replacement won't allow spaces in the phrase to be replaced, but TextExpander will.

    If it's not always a leading space, i.e. you want the last character before your substitution deleted no matter what that character is, I think you could accomplish that in TextExpander also, through scripting. TE supports AppleScript, Bash, Perl, etc. scripts as part of its substitutions - but I've not had to go there for my needs.

Share This Page