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.
  2. Dismiss Notice

Button gets stuck when Steam overlay opens

Discussion in 'Input System' started by D_Kond, Sep 15, 2021.

  1. D_Kond

    D_Kond

    Joined:
    Mar 3, 2015
    Posts:
    25
    When I open the steam overlay while pushing a button (e.g. the button for go to the left) and then closed it, this button gets stuck until it is pressed again. In the example with the left button, the character will run to the left. And if I just press the right button, the character just will stay. It's a kind of the left and the right button being pressed simultaneously.

    Of course, the left and the right button are in one composite input action.

    If I reset this action, then next time like this
    Code (CSharp):
    1. public void OnApplicationFocus(bool hasFocus)
    2. {
    3.     if (hasFocus) return;
    4.          
    5.     foreach (var action in InputSystem.ListEnabledActions())
    6.     {
    7.         action.Reset();
    8.     }
    9. }
    I will have to press the left button twice for it to work.

    Maybe, is there a bug in InputAction.Reset()?

    What do I have to do after closing the overlay?
     
    Last edited: Sep 15, 2021
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,653
    +1 We have a composite with Ctrl\Alt buttons and app focus changes often just breaks them (as you can click Alt + Tab for switching window and Alt often will stuck), sometime modifiers just become stuck until you click it again. Despite we have Ignore Focus background behaviour. And on focus leave we also Reset controls, seems this can be an issue Sorry, but will ping you as we suffering from that too @dmytro_at_unity
     
    Last edited: Oct 6, 2021
  3. grrava

    grrava

    Joined:
    Nov 11, 2012
    Posts:
    36
    We're seeing this issue too, after a steam overlay has been activated and disabled again, Keyboard.current.altKey.isPressed remains true
     
  4. TheFalconeerDev

    TheFalconeerDev

    Joined:
    Sep 18, 2019
    Posts:
    95
    I also have this with the steam overlay. Is there any action from @Unity3D on this?
     
  5. makomarkus

    makomarkus

    Joined:
    Oct 28, 2020
    Posts:
    54
    @dmytro_unity665 @dmytro_at_unity do you guys have any update on this issue? It seems some overlays don't trigger OnApplicationFocus changes, and Input keys are stuck in their state they had when the overlay was activated