|
hi
thanks. I had alot of problems with
sysNotifyEventDequeuedEvent
getting NULL write and crashes so i've switched to using
sysNotifyVirtualCharHandlingEvent
and it seems to be working now.
thanks
----- Original Message -----
Sent: Wednesday, December 14, 2005 7:02
AM
Subject: Re: sysNotifyEventDequeuedEvent
help!
I use the sysNotifyVirtualCharHandlingEvent to receive hardkey
presses and it works fine. Code: else
if(np->notifyType ==
sysNotifyVirtualCharHandlingEvent)
{ SysNotifyVirtualCharHandlingTag*
tag = (SysNotifyVirtualCharHandlingTag*)np->notifyDetailsP;
if(tag->keyDown.chr ==
vchrHard2) {
// make sure we don't respond to
autoRepeat events, i.e. only respond once per button
push
UInt16 mask = tag->keyDown.modifiers &
autoRepeatKeyMask;
if(mask == 0)
{
// do stuff here...
np->handled =
true;
} }
}
Anyway, that seems to work for me.
-Benjamin
Bloomfield
On 12/13/05, PalmDev <[EMAIL PROTECTED]> wrote:
i'm
hooking sysNotifyEventDequeuedEvent() to receive hardkey presses.
the
problem i'm having are:
1. i get two events for the same key
press 2. the event never seems to go away when i set the handled flag.
here is you my code:
case
sysNotifyEventDequeuedEvent: {
SysEventType *evt = (SysEventType
*)((SysNotifyParamType *)cmdPBP)->notifyDetailsP;
switch(EndianSwap16(evt->eType))
{ case
keyDownEvent: {
if ((EndianSwap16(evt->data.keyDown.chr) ==
vchrHard2))
{ ((SysNotifyParamType
*)cmdPBP)->handled =
true; // doesnt see to
work. the OS still get the event
}
break; }
} }
thanks
-- For
information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
--
For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
|