Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Caps lock in event taps doesn't send flags changed upon release
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Caps lock in event taps doesn't send flags changed upon release




On Jan 31, 2007, at 8:14 PM, Ben Gertzfield wrote:

So, I would argue that this is not an electromechanical implementation detail of the hardware, but perhaps an implementation detail of the USB HID driver that talks to USB keyboards on Mac OS X 10.4 hosts.

I tried 4 other USB keyboards I had lying around (Apple and non- Apple), and all of them behaved identically.

Could be. I haven't designed any USB keyboards.


I also found this intriguing behavior of keyboard event taps with the source program I sent in my initial post to this thread:


[beng@beng-macpro:~]% ./test

(I hold down the left Option key)

Got flags changed event. Old flags 0x100, new 0x80120, changed 0x80020.

(I hold down the left arrow key)

Got key down event, keycode 0x007B.

(I release the left Option key while keeping the left arrow key held down)

Got flags changed event. Old flags 0x80120, new 0x200100, changed 0x280020.

0x200000 is NX_NUMERICPADMASK. Why am I being told Num-Lock is being pressed in this case?

NX_NUMERICPADMASK does not mean what you think it means. It indicates the keystrokes originate from the numeric keypad area of a keyboard, and does not reflect the state of the Num Lock switch. Arrow keys are considered part of the numeric keypad area.


This flag is present to allow applications to differentiate between key characters from the main keyboard matrix and ientical characters from the numeric keypad matrix, such as the number keys and math symbols.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Caps lock in event taps doesn't send flags changed upon release (From: "Ben Gertzfield" <email@hidden>)
 >Re: Caps lock in event taps doesn't send flags changed upon release (From: Mike Paquette <email@hidden>)
 >Re: Caps lock in event taps doesn't send flags changed upon release (From: "Ben Gertzfield" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.