• 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: Finding keyboard state in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding keyboard state in Cocoa


  • Subject: Re: Finding keyboard state in Cocoa
  • From: "Mike Davis" <email@hidden>
  • Date: Mon, 27 Aug 2001 11:00:30 -0400

> From: "Tony" <email@hidden>
> To: <email@hidden>
> Subject: Finding keyboard state in Cocoa
> Date: Sun, 26 Aug 2001 01:03:48 -0400
>
> AFAIC currently you must use Carbon GetKey to find, for example,
> Caps Lock key state. Cocoa keyDown would not be called if you press
> Shift key.

I have to use that and it's skanky since it's a poll. I also had to
subclass NSApplication to stop it sending Command key combos when I wanted
to read them. I didn't like doing that.

>
> As there are apps where this functionality is important, mine being
> one of them, are there plans to add it to Cocoa or are there ways
> to get it that I am unaware of?

I think the scan codes are in the NSEvent too, unless I'm mistaken. I know
the keys are there in two forms but I also think the scan codes are too.

>
> Thanks,
> Tony


  • Follow-Ups:
    • Re: Finding keyboard state in Cocoa
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: Problems with copy/paste from HTML pages
  • Next by Date: Re: cocoa-dev digest, Vol 1 #471 - 11 msgs
  • Previous by thread: Re: Finding keyboard state in Cocoa
  • Next by thread: Re: Finding keyboard state in Cocoa
  • Index(es):
    • Date
    • Thread