on 2008-04-30 3:44 AM, Laurence Harris at email@hidden wrote:
> On Apr 29, 2008, at 7:07 PM, Stefan Werner wrote:
>
>> I believe the preferred method is to not use any polling whatsoever
>> and listen for key up/down events instead. I am not aware of any
>> direct 'modern' replacement for GetKeys (or GetMouse).
>
> It's not just useful for polling. There are times when I want to
> determine if and which keys are down that could not be addressed with
> events. GetKeys is the only option for these cases.
If you know which key you want to test, look at the CGEventSourceKeyState
function, described in the Quartz Event Services Reference document. Or
CGEventSourceFlagsState for modifier keys. These work in Tiger and Leopard.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden