Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
š« Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
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