Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Excluding function keys also excludes "F" key, same as "ESC" and "E"

Discussion in 'Input System' started by S-Sz, May 4, 2022.

  1. S-Sz

    S-Sz

    Joined:
    Dec 17, 2021
    Posts:
    4
    Code (CSharp):
    1. rebind.WithControlsExcluding("<keyboard>/f1");
    2. rebind.WithControlsExcluding("<keyboard>/f2");
    3. rebind.WithControlsExcluding("<keyboard>/f3");
    4. rebind.WithControlsExcluding("<keyboard>/f4");
    5. rebind.WithControlsExcluding("<keyboard>/f5");
    6. rebind.WithControlsExcluding("<keyboard>/f6");
    7. rebind.WithControlsExcluding("<keyboard>/f7");
    8. rebind.WithControlsExcluding("<keyboard>/f8");
    9. rebind.WithControlsExcluding("<keyboard>/f9");
    10. rebind.WithControlsExcluding("<keyboard>/f10");
    11. rebind.WithControlsExcluding("<keyboard>/f11");
    12. rebind.WithControlsExcluding("<keyboard>/f12");
    13. rebind.WithControlsExcluding("<Keyboard>/anyKey");
    14. rebind.WithCancelingThrough("<Keyboard>/escape");
    If I remove this code I can assign F key. Other keys works normal.
    Input system version - 1.3.0
     
  2. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    513
    1.3.0 has a bug where keyboard inputs were matching on starts with so “e”
    Matches with “esc” and “F11” keys matches “F1” I believe that this was fixed in 1.4.0 but haven’t tested it yet.
     
    S-Sz likes this.
  3. S-Sz

    S-Sz

    Joined:
    Dec 17, 2021
    Posts:
    4
    Yes, you are right, "e" is also not working. Now it works like "esc" - cancels binding.
     
  4. Magnesium

    Magnesium

    Joined:
    Sep 14, 2014
    Posts:
    179
    Any update on this. I'm encountering a similar problem, by trying to prevent binding arrow keys, i can't bind A and D.

    Code (CSharp):
    1.  inputAction.PerformInteractiveRebinding(index)
    2.                 .WithControlsHavingToMatchPath("<Keyboard>")
    3.                 .WithCancelingThrough("<Keyboard>/escape")
    4.                 .WithControlsExcluding("<Keyboard>/upArrow")
    5.                 .WithControlsExcluding("<Keyboard>/downArrow")
    6.                 .WithControlsExcluding("<Keyboard>/leftArrow")
    7.                 .WithControlsExcluding("<Keyboard>/rightArrow")
    8.                 .WithControlsExcluding("<Keyboard>/anyKey")
    9.                 .WithBindingGroup("Keyboard")
     
  5. S-Sz

    S-Sz

    Joined:
    Dec 17, 2021
    Posts:
    4
  6. Magnesium

    Magnesium

    Joined:
    Sep 14, 2014
    Posts:
    179
    Think i'll wait for the next package release, my game is not shipping to the public anytime soon.
     
    Last edited: Jun 14, 2022