OptionKey madness

Richard Gaskin ambassador at fourthworld.com
Sat Mar 20 14:01:52 EST 2004


J. Landman Gay wrote:

> 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.

Arrgh!  Apple makes the ol' lightbulb joke increasingly unfunny with its 
relevance.

Okay, the numeric function keys are unusable to an app because most OSes 
reserve some of them, and numeric Option/Alt keys are out because Apple 
reserves some of them.

So I'm limited to command keys for triggering actions in text fields? 
Major drag.

Another major drag:  I've tried all manner of property settings and 
cannot reliably prevent repeated arrow keystrokes from triggering a 
player object, even when a field on the same card has focus and the 
traversalOn of the player is off (also tried the showController and 
alwaysBuffer, and many combinations thereof).

Is there a recipe/workaround/external/appeal to the gods which will 
reliably prevent keystrokes from triggering a response in a player?

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com


More information about the use-livecode mailing list