Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Rebind bug, arrows => print screen

Discussion in 'Input System' started by WryMim, Jan 10, 2020.

  1. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    74
    If we have turned off Num Lock and we click on the arrows, then put Print Screen.

    At the same time, everything works fine in the editor (Shortcuts), the problem is in the Input System.

    On the screenshot of tanks demo.

    Version 1.0.0
    Unity 2019.3.0f3

    upload_2020-1-10_22-35-24.png
     
  2. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    74
  3. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Same issue here: was fixed by pressing the NUM LOCK key
     
    spajus likes this.
  4. Shaggy39

    Shaggy39

    Joined:
    Sep 4, 2020
    Posts:
    9
    I'm also looking at the new Input System, and so far I'm a little perturbed by some of the inconsistencies. I get that it's a new system and will take some time to iron out, but NumLock should NOT affect the detection of Arrow Keys. No Operating System in the world changes the Arrow Key input based on NumLock's status... This is a bug, and I hope Unity addresses this soon. In the meantime however, thanks for the workaround, it works for me... although I'll be sticking to anything but this new system for now.
     
  5. FelipeQuevici

    FelipeQuevici

    Joined:
    Jan 8, 2013
    Posts:
    13
    This post is one year old and still no solution?
     
  6. Shaggy39

    Shaggy39

    Joined:
    Sep 4, 2020
    Posts:
    9
    Seems so... but knowing coding it might be more intricate of a problem then we think... hopefully we get something soon.
     
    FelipeQuevici likes this.
  7. FelipeQuevici

    FelipeQuevici

    Joined:
    Jan 8, 2013
    Posts:
    13
    Ok, but at least someone from unity should have acknowledged the bug, said they are working on it.

    They seem pretty active here on the forums, not sure why this one was ignored.
     
    Shaggy39 likes this.
  8. Shaggy39

    Shaggy39

    Joined:
    Sep 4, 2020
    Posts:
    9
    I haven't checked if it's fixed for myself as I'm just staying away from the New Input System until I hear of big changes, but as far as I'm aware, it does almost seem to be getting ignored... maybe more people have to bring this to their attention as well.
     
    Last edited: Jan 12, 2021
  9. FelipeQuevici

    FelipeQuevici

    Joined:
    Jan 8, 2013
    Posts:
    13
    Out of curiosity, are you using the old system or some other third party system? I'm thinking of ditching the new system too, too many bugs and some things are unnecessarily hard...
     
    Shaggy39 likes this.
  10. Shaggy39

    Shaggy39

    Joined:
    Sep 4, 2020
    Posts:
    9
    We've been using Unity 2018 for our projects, and we recently made the switch to the latest LTS (Long Term Support) of Unity (which right now is 2019), and continue to update when a newer version of the LTS comes out. During our time using Unity 2018, we 've made the switch to a package called "Input Manager CC", by "VersionMaybe." since it lets you change controls at runtime.

    "Input Manager CC" still uses the old Input System, and even when we don't use that, we use the old Input System. If we create a project with Unity 2019, we tend to use both so that way we can use the old Input System, AND parts of the New Input System, like the native Gamepad and Rumble support.

    I wish to stress however that this is not at all permanent and when the New Input System becomes satisfactory to us, we will be switching to it more or less full time. We also are not the creators of "Input Manager CC", AND aren't sponsored by them... but we love the package and hope you might find some use out of it too

    Here's to hoping this issue gets resolved, and that everything Unity makes in the future being great
    ~ Shaggy39
     
  11. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    74
    Hi, I'm the author of this thread. I recommend you to forget about InputSystem and buy asset "InControl", which works fine with both gamepads and keyboards
     
    Shaggy39 likes this.
  12. FelipeQuevici

    FelipeQuevici

    Joined:
    Jan 8, 2013
    Posts:
    13
    I'm planning on buying rewired, but it sucks that i have to rely on a paid asset to have some basic functionality
     
  13. KinanGH

    KinanGH

    Joined:
    Dec 3, 2019
    Posts:
    37
    Same issue here.
     
    Shaggy39 likes this.
  14. unitydreamer29

    unitydreamer29

    Joined:
    Dec 27, 2020
    Posts:
    47
    Issue still present in Input System 1.1.0 pre.5.
     
  15. Shaggy39

    Shaggy39

    Joined:
    Sep 4, 2020
    Posts:
    9
    There's no way they still haven't addressed this
     
  16. judah4

    judah4

    Joined:
    Feb 6, 2011
    Posts:
    256
    I just ran into this issue due to a player report. I can't believe this bug. 2020.3.15, Input System 1.0.2, etc.
     
  17. Shaggy39

    Shaggy39

    Joined:
    Sep 4, 2020
    Posts:
    9
    I can't believe they still didn't fix it... it's only been TWO YEARS
     
    KinanGH likes this.
  18. Bearsauce

    Bearsauce

    Joined:
    Jan 4, 2019
    Posts:
    26
    Just ran into this issue myself with the latest version of input system...
     
  19. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Did you file a ticket?
     
  20. judah4

    judah4

    Joined:
    Feb 6, 2011
    Posts:
    256
    Just opened Case 1359217.
     
  21. avrahamyor

    avrahamyor

    Joined:
    Dec 11, 2012
    Posts:
    3
    Seems like this was reported in 2019 and marked as Won't Fix:
    https://issuetracker.unity3d.com/is...-delete-or-the-arrow-keys-when-numlock-is-off

    I had encountered this problem when I wanted to detect if Print Screen was pressed to capture a screenshot and suddenly found 200+ image files on my computer :D
    To work around that, instead of checking keyboard.printScreenKey.wasPressedThisFrame, I've created a function to ignore Print Screen if any of the linked keys are pressed as well:

    Code (CSharp):
    1. if (!keyboard.printScreenKey.wasPressedThisFrame) return false;
    2. return !keyboard.downArrowKey.wasPressedThisFrame
    3.     && !keyboard.leftArrowKey.wasPressedThisFrame
    4.     && !keyboard.upArrowKey.wasPressedThisFrame
    5.     && !keyboard.rightArrowKey.wasPressedThisFrame
    6.     && !keyboard.insertKey.wasPressedThisFrame
    7.     && !keyboard.homeKey.wasPressedThisFrame
    8.     && !keyboard.pageDownKey.wasPressedThisFrame
    9.     && !keyboard.pageUpKey.wasPressedThisFrame
    10.     && !keyboard.endKey.wasPressedThisFrame
    11.     && !keyboard.deleteKey.wasPressedThisFrame;
     
  22. judah4

    judah4

    Joined:
    Feb 6, 2011
    Posts:
    256
    Interesting, here's the new bug report. https://issuetracker.unity3d.com/is...-trigger-prtscn-with-either-numlock-on-or-off
     
  23. Smg065

    Smg065

    Joined:
    Apr 27, 2018
    Posts:
    1
    For using the new input systems dynamic rebinding, you can fix this by calling and manually dumping the perform interactive rebind. When you create the rebind action, all you have to do is;

    Code (CSharp):
    1. //Call the rebind operation
    2. rebindOp = rebindMe.PerformInteractiveRebinding()
    3.                 //And tell it to ignore printScreen
    4.                 .WithControlsExcluding("<Keyboard>/printScreen";
    This also fixes issues with Insert, Home, Delete, End, and the like being bound to printScreen as well. Hopefully this helps.
     
    judah4 likes this.
  24. Mr_Rhetorical

    Mr_Rhetorical

    Joined:
    Dec 11, 2012
    Posts:
    5
    Seems to work for me! I just wish they'd fix this to begin with though...
     
    KinanGH likes this.
  25. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
    Hey folks, I'm currently fixing the bug as we speak :) The problem is not in input system package, but rather in our native code in Unity itself. The root of the problem is that we rely on RawInput scancodes based on https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc and unfortunately current code was incorrectly listening to 0x2A which is also sent as a prefix for some keys when numlock is off.

    The fix hopefully will land soon into 2022.1 alpha and will be backported to 2019.4/2020.3/2022.1/2022.2 with-in a few months. Sorry for the trouble.

    Screenshots from the doc:

    upload_2021-10-5_15-27-18.png
    And

    upload_2021-10-5_15-31-33.png
     
    wangsitan, KinanGH and judah4 like this.
  26. KinanGH

    KinanGH

    Joined:
    Dec 3, 2019
    Posts:
    37
    It's nice to see this problem fixed, thank you.
    In the meantime this fix is working well :
     
  27. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
    judah4 and KinanGH like this.
  28. Shaggy39

    Shaggy39

    Joined:
    Sep 4, 2020
    Posts:
    9
    That's a lot to keep track of considering we stopped watching this thread for a while

    Glad to see the issue's been fixed and that a lot of people came in to finally fix the problem! Gotta love the game dev community
     
  29. Shaggy39

    Shaggy39

    Joined:
    Sep 4, 2020
    Posts:
    9
    Amazing how something done so long ago causes problems in new systems today...

    Thanks again for the fix, I'm sure many people (including us) will be very happy with this :D
     
  30. judah4

    judah4

    Joined:
    Feb 6, 2011
    Posts:
    256
  31. Niclaskjellberg_TO

    Niclaskjellberg_TO

    Joined:
    Apr 1, 2020
    Posts:
    3
    Hi!

    How is the backporting going? I've been checking the bug report in the issue tracker and I can't find any info about implementation into any other version than 2022.1.0a16. We're currently on 2021.2.7f1. And this bug is still present. And as I understand it this is not a bug in the input system, so we have to wait for a proper Unity release for a fix.
     
  32. judah4

    judah4

    Joined:
    Feb 6, 2011
    Posts:
    256