Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug [2021.3.18f1] Xbox Game Bar makes Windows Key to stay pressed

Discussion in 'Input System' started by Quemagalletas, Mar 2, 2023.

  1. Quemagalletas

    Quemagalletas

    Joined:
    Feb 12, 2016
    Posts:
    2
    Hi all!


    I have a project where we use the new Input System and we use one binding set to "Any Key [Keyboard]" to be able to swap between different devices.

    The issue is that when we press "Windows + G" and bring up the game bar, the Windows Key gets stuck as pressed and does not go back to unpressed unless you unfocus the app. Because of this, callbacks .started or .performed does not get fired anymore.


    I have tried looking into things like OnApplicationFocus but this does not get fired.

    We have also set the Background Behaviour to "Reset and Disable all devices" but looks like the xbox game bar is not considered as background.


    We have found a workaround for us, which is setting every key but the windows key, but it is not ideal.

    Thank you!
     
  2. makomarkus

    makomarkus

    Joined:
    Oct 28, 2020
    Posts:
    57
  3. Quemagalletas

    Quemagalletas

    Joined:
    Feb 12, 2016
    Posts:
    2
    Not so far, sorry mate
     
  4. makomarkus

    makomarkus

    Joined:
    Oct 28, 2020
    Posts:
    57
    Filed a bug report? Seems to be also an issue with the old input system. When xbox overlay is active, it gets `Input.anyKey` stuck. Switching back to the game it keeps thinking that modifier keys are still pressed.

    Issue seems to happen with the windows Xbox overlay. No such issue with Steam overlay.
     
  5. makomarkus

    makomarkus

    Joined:
    Oct 28, 2020
    Posts:
    57
    The only way to get unstuck for players seems to be using "Ctrl+Escape". Until then Unity will register Ctrl as pressed.