Search Unity

Bug Wrong keyboard bindings displayed when gamepad is the current controls scheme

Discussion in 'Input System' started by Lenophie, Jul 24, 2022.

  1. Lenophie

    Lenophie

    Joined:
    Jul 5, 2019
    Posts:
    4
    Hello,
    I have a pretty easily reproductible issue regarding the new input system's way of handling bindings display for keyboards.

    Summary
    GetBindingDisplayString displays bindings for Qwerty keyboards whenever my gamepad is the current controls scheme and a PlayerInput component is active, even though I use an Azerty keyboard.

    Steps to reproduce
    • Open the Rebinding UI sample project for the Input System package
    • Add a PlayerInput component to the scene that references the Input Action Asset provided in the sample
    • Set your keyboard layout to Azerty
    • Start the scene
    • Notice how the displayed "Move" bindings switch between W/A/S/D and Z/Q/S/D whenever you switch between your keyboard and your controller
    • (Disabling the PlayerInput component fixes the issue)

    When interacting with the gamepad (keyboard still plugged obviously):
    upload_2022-7-24_18-35-15.png
    When interacting with the keyboard/mouse:
    upload_2022-7-24_18-35-50.png

    I'm wondering whether this is a bug or a misunderstanding on my part on how PlayerInput components work but I welcome any suggestion on how to circumvent this so my in-game rebinding UIs don't look confusing to players.

    Version:
    Unity 2021.3.6f1
    Input System 1.3.0 (tried 1.4.1 but didn't fix the issue)

    Thanks in advance!
     
    Last edited: Jul 24, 2022