on keyDown which
put toupper(which) into the selection
end keyDown
> We also need to have MetaCard accept numeric keypad entry. We are using
> Sun Sparc Stations. Any suggestions?
This should just work, but check to make sure that you don't have any
modifier keys down (use the xev application to verify this). For some
reason, Sun chose a bizarre mapping for the numeric keypad under Open
Windows such that Open Windows applications work fine with the numeric
keypad, but applications that don't use an Open Windows toolkit don't.
If you have a problem, use xmodmap to unbind the mod3 key and unbind
all keys from num-lock. Either that or use an MIT X11R4 or later X
server. They don't have this problem, and as a bonus work better than
the Open Windows servers in just about every other way too.
If you can't rebind the keyboard (no control over target hardware, or
must share the keyboard with an application that requires the keyboard
mapped the "standard" way), you'll have to do the remapping the hard
way using the the MetaCard rawKeyDown message:
on rawKeyDown which
if which >= 65456 and which <= 65465
then put which - 65456 into the selection
else pass rawKeyDown
end rawKeyDown
A rawKeyDown message handler can be used to catch other keyboard
events too. To find out the number to check for, put the following
handler in the field script and then press the key you're interested
in. The number that appears in the Message Box can then be put into
your script in a handler similar to the one given above.
on rawKeyDown which
put which
end rawKeyDown
> Thanks,
>
> Mike
>
-- *********************************************************************** * Scott Raney 303-447-3936 Remember: the better you look, * * raney@metacard.com the more you'll see -- Lidia * ***********************************************************************