How can I disable keyboard shortcuts while in a tool?

How can I disable keyboard shortcuts while in a tool?

Postby Alan Chatham » Wed Aug 24, 2011 9:36 pm

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!
0

Alan Chatham 
PluginStore Author
PluginStore Author
 

Re: How can I disable keyboard shortcuts while in a tool?

Postby TIG » Wed Aug 24, 2011 9:43 pm

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...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: How can I disable keyboard shortcuts while in a tool?

Postby Dan Rathbun » Wed Aug 24, 2011 10:17 pm

TIG wrote: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.
0
    I'm not here much anymore. But a PM will fire email notifications.
    User avatar
    Dan Rathbun 
    PluginStore Author
    PluginStore Author
     

    Re: How can I disable keyboard shortcuts while in a tool?

    Postby thomthom » Thu Aug 25, 2011 7:43 am

    Dan Rathbun wrote:
    TIG wrote: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.
    0
    Thomas Thomassen — SketchUp Monkey & Coding addict
    List of my plugins and link to the CookieWare fund
    User avatar
    thomthom 
    PluginStore Author
    PluginStore Author
     

    Re: How can I disable keyboard shortcuts while in a tool?

    Postby renderiza » Sun Dec 24, 2017 8:29 pm

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

    Thanks in advance!
    0
    User avatar
    renderiza 
    Premium Member
    Premium Member
     

    SketchUcation One-Liner Adverts

    by Ad Machine » 5 minutes ago



    Ad Machine 
    Robot
     



     

    Return to Developers' Forum

    Who is online

    Users browsing this forum: khanhnhkts and 20 guests

    Visit our sponsors: