Search Unity

Feedback Left Modifier Keys have confusing display names now

Discussion in 'Input System' started by nickleplated, Jan 23, 2020.

  1. nickleplated

    nickleplated

    Joined:
    Nov 2, 2018
    Posts:
    26
    In 1.0.0.preview.3, The left modifier key controls have a displayName that leaves off the word "Left"

    e.g. the left shift key control has the display name "Shift"

    When passing the left shift key's path into InputControlPath.ToHumanReadableString, it returns "Left Shift" instead.

    The right shift key returns "Right Shift" for both cases.

    Now that 1.0.0.preview.4 has support for synthetic controls that work for either left or right, this becomes very confusing.

    The displayName on the left shift key control is still "Shift"
    The displayName on the new synthetic shift key control is also "Shift"
    When using InputAction.GetBindingDisplayString on an action bound to the Left Shift key, it will return "Shift"
    When using InputAction.GetBindingDisplayString on an action bound to the new synthetic Shift key, it will also return "Shift"

    It's now impossible to tell if an action is bound explicitly to the left shift or is bound to either shift key by looking at the display name.

    Left Control and Left Alt have the same problem.