Key event data not available in eventRef
Key event data not available in eventRef
- Subject: Key event data not available in eventRef
- From: "Mills, Steve" <email@hidden>
- Date: Tue, 04 Mar 2014 19:03:34 +0000
- Thread-topic: Key event data not available in eventRef
I'm seeing something really odd. We get the NSEvent for the current keyDown when the user types an unmodified space. From that we get the eventRef to pass to some legacy code. Sometimes that EventRef will contain the correct space character (32) in kEventParamKeyMacCharCodes and the correct space character (32) in kEventParamKeyUnicodes. Other times it will pass back an INcorrect 0-value for kEventParamKeyMacCharCodes (and return noErr) and generate error -9870 (eventParameterNotFoundErr) for kEventParamKeyUnicodes. In both cases the kEventParamKeyCode will be correct (49). In all cases, the NSEvent contains the correct space character.
Any ideas why NSEvent is creating an incorrect EventRef under some circumstances but not others? In our app, switching tools causes the different results, which will swap in/out tool-specific menus in the menubar. None of the menus use modified or unmodified space as a key equiv.
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden