hotkeys going into text area:cocoa

I’m converting my app to cocoa after using carbon for years…
However, I’m having real problems with hotkeys.

If there is a text area or combo box on my window, whenever I type a hot key (A keydown in the main window), that key goes into that textbox…
Is there a way around this?

I’m running 2013 r4.1
Cheers,
Sean

Any control which receives keydown events will process that event before it falls through to the window. You will need to catch any “Special” keys you want in the textArea.keydown event and then return true for that key. Yes, that will prevent that key from being typed into your textArea. A better idea may be to make a menu item for that action.

[quote=232857:@Sean Clancy]If there is a text area or combo box on my window, whenever I type a hot key (A keydown in the main window), that key goes into that textbox…
Is there a way around this?[/quote]

Clearfocus will get the focus out of the TextField and let the window receive KeyDown.