Search Unity

Double shift keys bug

Discussion in 'Editor & General Support' started by Roidz99, Nov 2, 2018.

  1. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    198
    The last few weeks I've been working on a pinball game in unity and I've bumped into a game breaking bug that's been around since 2013 i believe.

    Over the course of those years until now there have been made numerous rapports of this bug but it never caught enough attention for unity to fix this. I hope this will change soon.

    What is this bug:
    When holding down both shift keys and then releasing one of them, the released shift key is not triggered as being released. Unity doesn't receive the UP state of the released shift key and therefore keeps acting as its still being pressed down. Only when releasing the other shift key it will trigger as being released.

    I think there is a bug in the Input class where the 'up' state is not checked per individual shift key when one is still being held down.
    This is not a hardware thing because there is a workaround (windows only) and other pinball games don't have this issue. This is a unity issue, or at least, other engines worked around it.

    I realize this is not a bug too many developers will suffer too much from but especially for pinball type games this is a game breaking bug.

    I would think this is not the hardest bug to fix so i hope unity can make this a priority.

    This bug is present since +-2013 and is still happening in unity 2018.

    PS: the 'workaround' only works on windows itself, not on webgl or other platforms, therefore i don't consider it a real workaround.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You should file a new bug for it. The old bug from 2013 got marked closed, but I don't see a reason for it (was it fixed and broke again, or did they close it as won't fix, etc).
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    By "other platforms" do you mean Linux? This doesn't happen on macOS.

    --Eric
     
  4. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    198
    I did file a bug rapport and unity is aware of this. I'm in contact with support and i'm hopeful this will get the attention it needs.
     
  5. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    198
    I'm aware of windows and webgl. I have not been able to test this on linux or mac
     
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Also not an issue with WebGL on Mac; I assume it's a Windows-specific bug, so that should be easier for them to deal with.

    --Eric
     
  7. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    198
    Yes, you are right, this seems to be a windows / windows-webgl bug only.
     
  8. Roidz99

    Roidz99

    Joined:
    Jul 8, 2010
    Posts:
    198
    I've filed another bug rapport with a test project.

    For whoever wants to try to reproduce this bug:
    https://www.dropbox.com/s/u9ksw7k5qpbu86g/shiftkeysBug.rar?dl=0

    How to reproduce:

    - press and hold left shift key
    - press and hold right shift key
    - release right shift key

    now you will notice that the right shift UP state is not triggered !

    - now release the left shift key also

    now you will notice that both up states of both shift keys are triggered !

    Sometimes it happens that the right shift UP state is triggered the first time, if this happens, keep
    holding the left shift key and try pressing the right shift again.

    This bug happens on windows EDITOR, windows WEBGL and windows desktop builds.