Search Unity

Clarification for other Contexts for Shortcuts -- Shortcut Manager for Constant KeyPresses?

Discussion in 'Editor & General Support' started by awesomedata, Aug 19, 2019.

  1. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    I am digging into the Shortcut System, but got a little confused about contexts (considering there are also "contexts" for Editor Windows, Menus, and whatnot) -- So my question is: Do any of these work with ShortcutManagement?

    What are all the possible contexts for Shortcuts?


    The second part of my question:

    One member of the Unity Team mentioned that the SceneView had a context that would work for continuous presses in the SceneView, but so far, I'm unable to find this option. The Mouse button isn't possible to use without making it into a tool either (as far as I'm aware), but having a shortcut to temporarily invoke a tool is a good option. I am trying to use letter keys in a similar way as WASD is used to control the camera in flythrough mode (i.e. pre-keyboard repeat-rate), but I can't get them to execute that way in the Editor. I don't want to lose the ability to use the Shortcut Manager since this is a tool meant to be used by others.

    TL;DR:
    Essentially, I want to remove the repeat-rate problem altogether and perform a method non-stop using a letter key. I also want to be able to invoke a mouse-based tool while holding a (shortcut manager-defined) letter-based key, then return to the previous tool when that key is released. I want to keep the advantages of the Shortcut Management system to be able to set this key.
    There is next to no documentation on this, so I was wondering -- How do I do these things? -- Would somebody mind sharing some basic code (or letting me know if this is even possible) please?
     
  2. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Nobody? -- I know this might be a difficult subject, but I want to talk about it.


    We need a better/easier way of handling realtime editor tools like Snapcam.
     
    Aeroxima likes this.