Brian's Waste of Time

Wed, 25 Aug 2004

Not Enough IDEA!

Thank you Florian!

Florian pointed out that maps F5 to complete. With the help of grep we get:

Woo hoo!

Along the way I learned how key bindings (and other UI type events) work in Cocoa. It is beautiful. I think I need to learn Cocoa if I want to do any UI stuff. Stop copying anything else when building a UI library. Of course, it really requires a message passing language to work rigt...

There is a default keybinding for the complete message, but it is incredible awkward. I added a better one to my local keybindings in ~/Library/KeyBindings/DefaultKeyBinding.dict:

    /* other keybindings I have set removed for brevity in example =) */

    "~ " = "complete:";

which binds the option-space key which I have bound in IDEA. Now I have auto-complete for spelling in any cocoa text widget! More information is available from Apple if you want other bindings.

2 writebacks [/tech] permanent link