rawKeyDown and key codes

Ken Ray kray at sonsothunder.com
Sun Sep 23 17:08:08 EDT 2007


On Sun, 23 Sep 2007 13:15:21 -0700, Paul Gabel wrote:

> Hello everybody:
> 
> In the Docs under rawKeyDown I find this sample script ...
> 
>   on rawKeyDown theKeyNumber
>     if theKeyNumber is 65308 then increaseScroll -- mouse wheel down
>     else if theKeyNumber is 65309 then decreaseScroll -- mouse wheel up
>     else pass rawKeyDown -- don't forget this!
>   end rawKeyDown
> 
> ... but I can't figure out how to get theKeyNumber in the first 
> place. I know it's just a rawKeyDown parameter here, but how would I, 
> for example, determine "theKeyNumber" for a comma so that I can trap 
> for it? Is there a list some place? Thanks.

You can always create a dummy field with  the script:

on rawKeyDown pKey
  put pKey
end rawKeyDown

Then type the comma in the field and you'll get your result.


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list