On Dec 19, 2011, at 6:51 AM, paolo mazza wrote: > Hi All, > how can I check if the "arrowKey up" is down or is up ? > > For example, for the option Key I can write .. if the optioKey is down > then..., for the mouse I can write ... if the mouse is down then ... > > What about the arrow keys ? > > All the best > > Paolo
on arrowKey theKey switch theKey case "Up" case "Down" case "Left" case "Right" end switch pass arrowKey end arrowKey Pretty simple. You can also use the keysDown() function which will return the same codes as rawKeyDown, so write a couple simple scripts to see which codes are for which arrows. They may not be the same on all platforms tho' so test with Windows, Mac and Linux to be sure. In the card script put: on escapeKey answer "Keysnatcher is off!" as sheet exit to top end escapeKey In a button on the card put: on mouseUp repeat put keysdown() into theKeysDown if theKeysDown is not empty then answer theKeysDown as sheet end if wait one second with messages end repeat pass mouseUp end mouseUp Bob _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode