Re: Detecting Keydowns
Re: Detecting Keydowns
- Subject: Re: Detecting Keydowns
- From: Vince DeMarco <email@hidden>
- Date: Thu, 14 Jun 2001 10:07:38 -0700
On Thursday, June 14, 2001, at 02:14 AM, Stiphane Sudre wrote:
On jeudi, juin 14, 2001, at 08:14 AM, Enrique Zamudio Lopez wrote:
If you want to detect the state of Control, Option and Command keys (I
think Shift is also available), you have to read the modifier flags on
a key event. You can usually override -keyDown: in your NSView
subclass and check on the modifier flags.
This solution does not fit my need, since there is no view. Just a
window. What I want to detect is whether the Option, Control, or
Command key is pressed when the user clicked in the Window Title Bar,
buttons.
I will go with the Carbon solution for the moment being.
Subclass NSApplication and over-ride sendEvent: and do something
interesting there.
vince