• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detecting Keydowns
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Detecting Keydowns
      • From: Gerard Iglesias <email@hidden>
References: 
 >Re: Detecting Keydowns (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: Cocoa an Resource Forks
  • Next by Date: Re: NSSound
  • Previous by thread: Re: Detecting Keydowns
  • Next by thread: Re: Detecting Keydowns
  • Index(es):
    • Date
    • Thread