I just ran into a problem that I already know from other programming languages ββ/ frameworks .... Whenever a user presses a certain button on the keyboard, he starts the same action as when a certain button is pressed in the graphical interface. (Some guys call these "shortcuts", D)
To give the user optical feedback, I would like to sort the βclickβ button programmatically, rather than calling the same functions that are called when the button is clicked.
If I set the button as the key equivalent in IB, it looks the way I want it. It is not possible to do this here, since the shortcut should be included only if the desired text fields have focus.
Could not find a method in NSButton or similar that sounded right. I'm sure you guys can give me some direction!
Best and thanks in advance
source share