3

I have some custom text substitutions set up in the Language & Text pane of System Preferences. But in order to activate a substitution, I have to type the shortcut and then press the spacebar. This results in the replacement text followed by a space character. So if I want the text to be at the end of a text field when I submit a form, for example, I have to type "[shortcut]space" instead of just "[shortcut]".

Is there any way to make the replacement instantaneous, so I don't have to insert and delete a space that I don't want?

1

I don't have this issue, pressing the enter key also works instead of space.

I created a custom Text Substitution in Language & Text, then opened TextEdit and it worked on any key press, not just space or enter.

  • Try it in iChat, for instance — if you type the keyword and hit enter, it doesn't trigger the substitution before sending your message. – jtbandes Mar 21 '12 at 19:56
  • thats an issue with iChat, and not just with custom substitutions. The OSX built in one also fail with the same issue. – Stu Wilson Mar 21 '12 at 19:59
  • Yes, but the root of the issue is that the substitutions aren't instantaneous... If they were, it'd work fine. – jtbandes Mar 21 '12 at 20:00
  • Agreed, but the if you think about possible text substitutions having it automatically process would cause many issues. if you wanted to have a text substitution for 1/32 you couldn't because the built in substitution for 1/3 would trigger before it got to the digit 2, so substitutions work after the next character and the service knows that a complete substitution match has been made and be performed. The iChat issue is just that, a bug. – Stu Wilson Mar 21 '12 at 20:07
  • 1
    i'm interested in this too .. would be nice if you could use a special key (right arrow key maybe) to auto complete without adding a space. I don't think this answer really solves the original question .. hitting enter isn't really ideal if you want to keep typing on the same line and if you're in webform hitting enter can cause the form to submit prematurely – locomo Nov 17 '17 at 15:50
2

The closest thing to doing what you’re after without using additional software, is to create a custom keyboard layout. You can map a single key or a key combination to any string you want.

For example, using my custom QWERTY layout, I can type + O to get ಠ_ಠ (instead of ø, which I never used).

It’s not really “text replacement”, but it’s a solution nevertheless. Also, I found that keyboard shortcuts work much faster than text replacements, once you get used to them. Another benefit of this solution is that it works in all applications, while text substitution only works in Cocoa apps.

2

Related: Text expansion for Mac OS X Lion?

TextExpander and DashExpander meet the requirement.

In TextExpander I have macros that are expanded without keying space, return or enter.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .