• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

How can I disable keyboard shortcuts while in a tool?

Scheduled Pinned Locked Moved Developers' Forum
5 Posts 5 Posters 3.2k Views
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 24 Aug 2011, 20:36

    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
    • T Offline
      TIG Moderator
      last edited by 24 Aug 2011, 20:43

      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
      • D Offline
        Dan Rathbun
        last edited by 24 Aug 2011, 21:17

        @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
        • T Offline
          thomthom
          last edited by 25 Aug 2011, 06:43

          @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
          • R Offline
            renderiza
            last edited by 24 Dec 2017, 19:29

            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