Button Keystroke Triggers Checkbox Instead

I have a layout with a button whose keystroke is a return/enter key. It works great… until… a specific checkbox is visible on the layout. When visible the return key unchecked the box and does not click the button. When the checkbox is hidden ti works fine. A second checkbox which is always visible does not seem to interfere with this function.

It seems like it has to be an interface problem…

Anyone have any ideas as to what I should check?

Hi,

a checkbox and a button belong to the same class NSButton.
Check the key equivalent of the checkbox in Interface Builder, it’s supposed to be none

The checkbox does not have a key equivalent. I think that a combo box may be to blame. This problem only occurs when the focus is in the combo box… basically, the script is acting like the user just selected an item and that is triggering a script that is resetting the box.

I guess I am looking for a way to un-focus the combo box once a selection is made and I think that will solve my problem.

This problem was solved by some painstaking management of which controls are in focus and stopping a handler from executing multiple times when a combo box item is selected and then again when exited.