Re: Finding keyboard state in Cocoa(Ondra Cada)
Re: Finding keyboard state in Cocoa(Ondra Cada)
- Subject: Re: Finding keyboard state in Cocoa(Ondra Cada)
- From: "Tony" <email@hidden>
- Date: Mon, 27 Aug 2001 23:22:17 -0400
>
Ondra Cada <email@hidden> write on Mon, 27 Aug 2001 17:47:47 +0200
>
MD> >As there are apps where this functionality is important, mine being
>
MD> >one of them, are there plans to add it to Cocoa or are there ways
>
MD> >to get it that I am unaware of?
>
Of course there are, the aforementioned one. Get the modifiers from the
>
NSEvent using the modifierFlags message.
The problem is that my input is not keyboard.
Imagine OCR or digitizer tablet or voice input that doesn't recognize the
case.
So I start the app, my input sends me letter "o" and want to know if
Caps Lock is pressed because then I will turn it into "O".
So, if Carbon has the means to do this, if Windows does, if Java also
has since 1.3 Toolkit.getLockingKeyState() methods to find the initial
state of these keys, why not App Kit?
Tony