Auto-complete words with the Escape key

Here’s an interesting thing that I stumbled across tonight by pressing the wrong key.

esc-autocomplete

In Mail.app hitting the Escape key pops up an autocomplete dialog.

Arrow down to the word you want, hit Return or Tab, and you have saved your fingers a few keystrokes.

This works in TextEdit, ecto and Yojimbo as well, but not in BBEdit, Mellel or Safari. There will be some obvious pattern here that I haven’t worked out yet.autocomplete, escape key, mail.app, apple mail, productivity

Similar Posts:

Tags: , , , ,

10 Responses to “Auto-complete words with the Escape key”

  1. Christopher says:

    Hm. I thought you had mistyped that, because I knew that if you hit option-Esc in any Cocoa app, it brings up the same word auto-completion. That’s strange, but nifty, that just Esc works in Mail.

  2. Justin Williams says:

    The Mail team probably overrode the default behavior to register for just the Escape key as well.

  3. Tim says:

    @Christopher: And Function-Escape and Control-Escape and Shift-Escape as well. Seems Excessive. Or my PowerBook is really in trouble.

    @Justin: But then it would only work in Mail, right?

  4. Mike says:

    I use F5, which has always been available, AFAIK, for that purpose.

    All Cocoa applications will do it: it’s in NSTextView:

    http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSTextView.html#//apple_ref/doc/uid/20000373-BBCFEJEH

  5. Tim says:

    Mike: I’m not very well-versed in these matters, I’m afraid.

    If it’s a Cocoa-based thing, why doesn’t the same option exist when filling out text fields in Safari?

    Is there a simple explanation that I would be likely to understand?

  6. Brady J. Frey says:

    Wow, the escape key? Why would I ever want to teach a user to touch that key other than in dier situations?

  7. Patrick Wynne says:

    Okay, so you typed “acci”, hit ESC, scanned the list that pops up for the one word you want, arrowed down to it, hit Return and got “accident”

    Versus just typing “dent”.

    How exactly is this better?

    There are situations where autocomplete can be useful, but I’ve never found freeform writing to be one of them. Coding, yes. Email or word processing, no. There are usually just way too many possibilities to make the popup list very efficient.

    YMMV of course.

  8. Tim says:

    Patrick: Sure, it’s a YMMV thing. More useful for the Louisiana League of Libertarians than fans of the New York Jets, for example.

    In any case, anyone who is serious about saving keystrokes will use a proper snippet manager like Textpander or Spell Catcher X.

    I was really just surprised to find that the Escape key did this at all.

  9. Jeremy says:

    The completion system has always been present in Cocoa. The “pattern” for whether it works or not is whether the view supports the “complete:” method, which NSTextView, for example, does. So if you have an NSTextView, you have completion.

    Just hitting escape to get it is not the default. Safari text areas and text input fields will happily do Cocoa completion with option-escape. I also have it bound to control-c, which is easier to press.

    Spell Catcher does some cool things like add to the completion list from your address book, and from the spelling dictionary.

  10. brad says:

    Auto-complete seems a bit buggy. Sometimes it works, sometimes it doesn’t. I’m sure it used to work in Mail.app, but now it simply generates an error sound. Yet it still works in TextEdit.

    Similarly, other users have called me over to ask how to get it to work on their Macs, and I couldn’t help them get it to work in any apps.

    After quitting and relaunching Mail.app, mine works again. And then it doesn’t. However, if I highlight the last letter in what I’ve typed so far – it works again. But that’s more than a little awkward.

    In any case, unless it works 100% of the time, it’s not much use. I’m a little disappointed. I’m using OS X 10.4.8.

Leave a Reply