tags:

views:

69

answers:

1

I have an NSComboBox embedded in the toolbar. I would like to "capture" the enter key as an event to trigger an action. I tried NSControlTextDidChangeNotification but you cant get the key that was pressed. Any help is appreciated...

+1  A: 

An NSComboBox is a kind of text field, which is a kind of control. As such, targets and actions should, theoretically, just work.

Did you set the target and action of the combo box?

Did you set the target and action of the toolbar item?

Peter Hosey
bingo, that worked! thanks
Ronaldo Nascimento