Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

10.1.3 ReceiveNextEvent gets '\0' for rawKeyDown



The following code on 10.1.3 always gets ch == '\0' for any key I press:

// got here from an application-level command event handler invoked from my RAEL loop

const EventTypeSpec spec[] = {{ kEventClassKeyboard, kEventRawKeyDown }};
EventRef event;
char ch;
verify_noerr( ReceiveNextEvent( 1, spec, kEventDurationForever, true, &event ));
verify_noerr( GetEventParameter( event, kEventParamKeyMacCharCodes, typeChar, NULL,
sizeof(char), NULL, &ch ));
// ch == '\0'... but we'll try another way...

EventRecord eventRec;
verify( ConvertEventRefToEventRecord( event, &eventRec ));
ch = (char) (eventRec.message & charCodeMask);
// ch still == '\0'

ReleaseEvent (event);

This worked fine on 10.1.2. In fact, it happens on 10.1.3 even for old executables (not recompiled) that definitely run fine under 10.1.2.

Before I put further work into isolating this and/or file a bug, has anyone else seen anything like it?
TIA,
Dan
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.


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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.