OptionKey madness
J. Landman Gay
jacque at hyperactivesw.com
Sat Mar 20 12:55:19 EST 2004
On 3/20/04 10:12 AM, Scott Rossi wrote:
> On 3/20/04 3:24 AM, "Richard Gaskin" <ambassador at fourthworld.com> wrote:
>
>
>>This card script:
>>
>>on rawKeyDown k
>> if optionKey() is "down" then put k
>> else pass rawKeyDown
>>end rawKeyDown
>>
>>... displays the value of k when typing Option-2, Option-5, or Option-8
>>into a field, but not when typing any other numeric Option keys in a field.
>
>
> Same here in MC and Rev 2.1.2 on OSX. Seems to be optionkey related since
> capturing unmodified keystrokes works fine. I wonder if this has to do with
> how you enter special characters like é (accented e) since you typically
> have to enter two keystrokes.
I think that is exactly the problem. Mac OS does not send any key codes
for certain option key characters until the second key is typed; at that
point it combines the two keystrokes into one character with an
international diacritical. This isn't really a bug; it is the way Mac OS
works.
Other keystrokes are similarly unreported; for example, Shift and
Command keys send nothing at all until they are paired with another
typed character.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list