š” LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
Keycode with onKeyUp question
-
I'm trying to use the arrowkeys to move an object in a ruby script.
I've found the onKeyUp info in the docs but my initial question is what keycode the arrow keys have?
While googling IĀ“ve found both: 103, 105, 106, 108 and 200, 203, 205, 208. Which is it?
Or can I use up, left, right, down or uparrow, leftarrow, rightarrow, downarrow?
Thanks in advance! -
They are different for the Mac and the PC. In your onKeyUp method, simply put in a "puts" to print out the keycode for any key you press. If you need a keycode for the other platform you might not have, ask.
Todd
-
Thanks! I'll try that.
Advertisement