Hi
What I did (that works on T-W and T-C) is trap the fldEnter event and if the currently focused field has the numeric attribute set, I post a custom "SetNumLock" event . In response to that event I set the graffiti state. I had to post the extra event because setting the graffiti state in the fldEnter didn't work... the extra "delay" does work. On the Treo600 setting the graffiti state did not work, but is not required anyray... it sets the numeric state automatically on field that has the numeric attribute. (my code detect the palm model). I have not tested the Treo 650.

Regards,
jerome


Robert Moynihan wrote:
[EMAIL PROTECTED] wrote:

I am project that involves a lot of numeric input. On devices that have a built in keyboard where certain letter keys are also used as number keys (i.e. the Treo 650, Tungsten C, and the Tungsten W) I'd like to have the num lock be automatically set. I've used the GrfSetState(false,true,false) to attempt to set this. On a tungsten E with an infared keyboard I get an acceptable behavior. If I set num lock manually (The call to GrfSetState is there but doesn't seem to function properly), the num lock set persists if I move to a new field. On the Tungsten C num lock is disabled every time you change fields. On the Palm OS Emulator is there a way to activate num lock so I can debug this? Also the GrfSetState function dosen't seem to work properly, despite the fact that the Tungsten C, and Treo 650 are running OS 5.2.1. Is this issue with the GrfSetState function a known bug? If so is there a work around?
I faced the same type of problem, and what I ended up doing was to catch all the keyDown events and translate them myself. So if I caught a 'd' or a 'D' I would call it a '4' and handle it appropriately. The catch to this is that the keypads are not uniform, and non-querty keypads have to be handled with a different mapping. My solution never felt quite right, but sometimes you do what works, until the right solution presents itself. Bob.




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

Reply via email to