Hi david,
My code for getting for value from keyboard event is as follows.
static OSStatus MainWindowEventHandler_ ( EventHandlerCallRef
nextHandler,EventRef event, void *userData)
{
OSStatus statPara;
UniChar text;
UInt32 actualSize;
EventParamType hasType;
statPara = GetEventParameter
(event,kEventParamTextInputSendText,//kEventUnicodeForKeyEvent,//
kEventParamTextInputSendText,
typeUnicodeText, &hasType, 0, &actualSize, NULL);
text =(UniChar)NewPtr(actualSize);
statPara_ = GetEventParameter (event, kEventParamTextInputSendText,
typeUnicodeText, &hasType, &actualSize, NULL, &text);
}
Now as per my knowledge actual values are coming in text variable.
But It's not proper by this code.
Can u please modify and explain the code to me so that I can compare the
value to Return key code.
Thanks
-Hemant


|