discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Key Equivalent on button


From: Andreas Höschler
Subject: Key Equivalent on button
Date: Wed, 19 Apr 2006 19:04:23 +0200

Hello all,

I implemented a panel (NSPanel) with a textfield and the buttons Cancel and OK. I would like the ok button to be fired when the user hits return in the text field. According to my understanding of the OPENSTEP spec one should get this behaviour with

   [okButton setKeyEquivalent:@"\r"];

This at least works under MacOSX. On GNUstep this does not do anything. While googling I found a hint regarding the modifier mask. I therefore also tried

   [okButton setKeyEquivalent:@"\r"];
   [okButton setKeyEquivalentModifierMask:NSControlKeyMask];

but this didn't chane anything. I found no key sequence (Return, Ctrl-Return, Command-Return,...) that would cause the ok button to perform its action. What am I missing? Any workaround (seems to be a GNUstep bug) or idea how thi smight be fixed?

Thanks,

 Andreas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]