Thanks for your response, Kurt. I'm sure input can be validated that way, although 
it's not very efficient, especially since my users' input comes from the entire range 
of ANSI 32 to 255 decimal, and the offset function insists on using its own judgement 
on character equivalencies (lower  case vs. upper case vs. accented characters in 
various languages don't coincide). When I need an offset, I have to go by ANSI 
numbers. This may not apply to the characters that are entered by function keys... 
Still, it would be cleaner to stop the event.

So we still don't know if it's true and legitimate behavior for a projector to treat 
certain function keys diferently from other function keys and from other keys... they 
can be detected but not stopEvent'ed. Bummer! All these workarounds when there's a 
suppsoed to be a straightforward mechanism...

But thanks for writing. I'll probably use your solution.

Slava

At 12:44 PM 7/2/04 -0400, Kurt Griffin wrote:
>>I'm trying to intercept and cancel function key presses by using statements like 
>>this in the handler that is assigned as the keyDownScript:
>>
>>if the keyCode = 11 then  --the F 12 key
>>   stopEvent
>>   exit
>>end if
>>
>>The values of keyCode for the function keys are between 96 and 101, and also 103, 
>>109, and 11. The reason I want to intercept these keypresses is that they enter junk 
>>into the editable member that has the focus.
>>
>>My intercept works for all function keys except F1, F2, F4, and F12. The interesting 
>>part is that any of these keypresses is detected, but only the other function key 
>>presses can be stopped. The F1, F2, F4, and F12 seem to be impervious to stopEvent. 
>>What am I doing wrong? How do I stop these keys from entering junk into editable 
>>members?
>>
>>This is in Dir MX (9) and Windows XP.
>
>Well, you could tackle it from the other direction. Make a string of acceptable 
>characters, and do something like this:
>
>(untested email code, in the form of a behavior for your editable text sprite)
>------------------------------
>property pAcceptableCharsString = "abcdefghijklmnopqrstuvwxyz1234567890!,.:;'? etc."
>
>on keyUp me
>  if offset(the key, pAcceptableCharsString) > 0 then
>    pass
>  end if
>end
>------------------------------
>
>hth,
>Kurt

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to