Search Unity

Resolved Editor key binding conflicts with game in play mode

Discussion in 'Input System' started by lcompton, Feb 13, 2021.

  1. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    102
    I'm having problems with key binding conflicts between my game and the editor when playing the game from the editor. I'm using InputSystem 1.0.2 on Unity 2020.2.4f1. Is there a way to have the game input flow take precedence over editor shortcuts? I'm finding myself temporarily redefining the game bindings to get around this problem. I'd prefer to not delete the editor bindings if possible. They're not tied to things I'm currently using, but that could change and who knows what other conflicts I'll run into. I'd rather have the game take over input while playing or at least when the cursor is within the game window. Any help is appreciated.
     
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    When the game view has focus, the editor is expected to not trigger most shortcuts (stuff like CTRL-P being the exception). Put another way, if you click inside the game view and then hit the delete key, the delete key shortcut should *not* trigger. If that is not happening for you, please file a ticket with the bug reporter.
     
  3. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    102
    Thanks. The editor is allowing most inputs to pass through into the game, but I've managed to step into a bundle of inputs that are captured by the editor, including...
    • CTRL-1
    • CTRL-5
    • CTRL-6
    • ALT-5
    Other than tracking down and changing the editor shortcuts that are interfering with my inputs, is there a way to tell the editor that the game should receive these inputs?
     
  4. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    I'm not away of any exposed mechanism to affect that logic. The editor is supposed to handle this internally and treat game view focus different to focus on other EditorWindows.

    Talking to the editor folks, seems like the mechanism we employ when it comes to menu shortcuts may need some tweaking. Would recommend filing a ticket for the problem.
     
    lcompton likes this.
  5. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    102
    OK. I'll file a ticket. I appreciate the quick response!
     
  6. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    102