sketchucation logo sketchucation
    • Login
    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

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 993 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • PixeroP Offline
      Pixero
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • T Offline
        todd burch
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • PixeroP Offline
          Pixero
          last edited by

          Thanks! I'll try that.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement