sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    How can I disable keyboard shortcuts while in a tool?

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 5 Posters 3.2k Views 5 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.
    • A Offline
      Alan Chatham
      last edited by

      I'm developing a plug-in to allow for First Person Shooter style WASD movement in SketchUp, and I'm wondering if it's possible to disable or override SketchUp's keyboard shortcuts when it's active? Right now, my janky fix is to require that Shift be held down while navigating with WASD, since that seems to block out shortcuts, but obviously having to keep holding down the shift key isn't ideal. Thanks!

      1 Reply Last reply Reply Quote 0
      • TIGT Online
        TIG Moderator
        last edited by

        You can't...
        You can only disable the VCB in a tool, but keys are read anyway...
        Use the arrow-keys, or number-keypad - these shouldn't be short-cutted...

        TIG

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          @tig said:

          You can't...

          .. which I do not understand. We can 'intercept' all manner of key combos... but the keys still "bubble up" to the application window!

          It's annoying! It can cause another tool to inadvertently become active in the middle of a Ruby tool process.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            @dan rathbun said:

            @tig said:

            You can't...

            .. which I do not understand. We can 'intercept' all manner of key combos... but the keys still "bubble up" to the application window!

            It's annoying! It can cause another tool to inadvertently become active in the middle of a Ruby tool process.

            Yup. I've requested a few times that we should be able to return true/false to the key events in order to control the event bubbling.
            I've often wanted to intercept the key presses.

            There are some characters that can be pressed while a tool is active, if they are typed after a number. c d e g m s - so we can type, 1m 1mm 1cm 1dm 1deg 1s etc...
            So SketchUp natively intercepts keys for its own usage. So I really think custom Ruby tool should have that power as well.

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • renderizaR Offline
              renderiza
              last edited by

              Hi, I am running on this same issue... Has this been fixed yet or is there a trick around this?

              Thanks in advance!

              [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

              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