Search Unity

Bug RebindActionUI won't detect the P key in the keyboard if I exclude the "Print Screen" key

Discussion in 'Input System' started by PedroMarangon, Nov 20, 2022.

  1. PedroMarangon

    PedroMarangon

    Joined:
    Feb 27, 2018
    Posts:
    9
    I'm using the RebindUI sample to build a rebind screen for my game. However, I'm facing a bug about the P key on the keyboard.

    If I have the NumLock active (which I always have because I use constantly, not only to write number but also while I'm gaming since I'm left-handed) the arrows/Home/Page Up/Page Down/End/Delete/Insert keys are recognized as PrintScreen. "Okay, I'll just exclude PrintScreen from the rebind action in the code", I thought to myself.

    However when I remove the PrintScreen with the
    WithControlsExcluding("<Keyboard>/printScreen")
    line, for some reason that also disables the P key for some reason (and even weirder, only the P key returns also the "anyKey" candidate, so if I try to remap some binding to the P key it'll remap to AnyKey).

    Could someone help me out with this? I need this to be ready for today (tomorrow morning I'll present my game in a public event and I want to fix this ASAP)


    Edit: I've managed to fix this. I was using version 1.3.0 of the Input System. Upgrading it to 1.4.4 fixed the problem (sidenote: I had to manualy change the "See all versions" toggle of the Package Manager settings in the UI Toolkit Debugger to actually be able to change this. This option could be visible by default imo)
     
    Last edited: Nov 20, 2022