>#############################################################################
>Please explain me why I should use
>
>if (TxtCharIsVirtual (eventP->data.keyDown.modifiers, event.data.keyDown.chr))
>
>[or with TxtGlueCharIsVirtual] as opposed
>
>to
>
>if (event.data.keyDown.modifiers & commandKeyMask)
>
>Thanks! Best regards, Paul
>#############################################################################

The main reason to use TxtGlueCharIsVirtual is to work around bugs in 
older versions of Graffiti, where some virtual characters are 
accidentally enqueued without the commandKeyMask modifier.

The reason the TxtCharIsVirtual macro was created in the first place 
was to replace an older macro that just checked the character code 
value against a range, versus testing the commandKeyMask bit in the 
modifiers flags.

At 12:00am -0700 01-05-23, Palm Developer Forum digest wrote:
>Because there are several modifiers flags that make a key event 
>virtual, not just the commandKeyMask flag. As of Palm OS 4.0 they 
>are:
>
>   appEvtHookKeyMask | libEvtHookKeyMask | commandKeyMask

Event.h defines an EvtKeydownIsVirtual() macro that tests these 
flags. Note, however, that SysHandleEvent will always return true for 
a keydown event that has either the appEvtHookKeyMask or 
libEvtHookKeyMask flags set, so unless your app has an unusual event 
flow, your typical form event handler will never see a keydown event 
with either of these two flags set.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to