At 12:00am -0800 00-04-01, Palm Developer Forum digest wrote:
>Subject: EvtKeyDownIsVirtual is evil?
>From: "Steve Palmen" <[EMAIL PROTECTED]>
>Date: Fri, 31 Mar 2000 15:28:29 -0800
>X-Message-Number: 57
>
>according to the comments that preface it, the EvtKeyDownIsVirtual macro
>(3.5 SDK Event.h) should only be used on OS 3.5 and higher. the comments
>instruct that TxtGlueCharIsVirtual should be used for all earlier OSs.
>
>all EvtKeyDownIsVirtual does is check the keyDown.modifier appEvtHookKeyMask
>| libEvtHookKeyMask | commandKeyMask bits. are these bits not set properly
>on OS releases < 3.5? for an app targeted at OS 3.1 and higher, it seems a
>waste to have to link in PalmOSGlue.lib just to get at TxtGlueCharIsVirtual.
>
>yes, i realize i can ignore EvtKeyDownIsVirtual and TxtGlueCharIsVirtual,
>and just check modifiers commandKeyMask myself. i'm just curious.
Prior to OS 3.2, some of the virtual keyDown events generated by
Graffiti would _not_ have the command bit set, thus the existence of
the TxtGlueCharIsVirtual routine.
Note that if you link in PalmOSGlue.lib, any routines that you don't
use will be dead code stripped by the linker, thus the net impact on
your app's size is minimal.
Also note that the EvtKeyDownIsVirtual checks all three of the
special modifier bits you mention, because it's used by the system.
The TxtGlueCharIsVirtual routine only checks the command bit, because
it assumes that you've already called SysHandleEvent, which will
process the other two types of special keyDown events. Perhaps a
better name for EvtKeyDownIsVirtual would have been
EvtKeyDownIsSpecial.
-- 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.palm.com/devzone/mailinglists.html