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

Can't bind arrow keys on AZERTY keyboard

Discussion in 'Input System' started by Kawottex, Jul 16, 2019.

  1. Kawottex

    Kawottex

    Joined:
    Feb 23, 2019
    Posts:
    11
    Hello,
    I'm currently trying a way to change inputs in game, and to do that, i've created an InputAction in order to detect any key from any controller (keyboard/gamepad):
    Code (CSharp):
    1. anyKey = new InputAction(binding: "/*/<button>");
    2. anyKey.performed += AnyKey_performed;
    3. anyKey.Enable();
    I'm aware it's pretty ugly, but if you know a better way to do it, i'll take it with joy :)

    Anyway, this system is working pretty much well, except for arrow keys.
    When I press an arrow key, the key detected is "/Keyboard/printScreen" (for every arrow key).
    BUT, I've also found a strange behaviour: when I quickly change arrow keys (like alternate right/left, or left/up...), one arrow key got the "/Keyboard/printScreen" but the other got the correct name detected.

    Do you have any way to fix this ?

    For information, I'm using an AZERTY keyboard and I've no problem with using arrow keys dirrectly in UI, it's only when I try to detect an arrow key on binding "/*/<button>".

    Thank you,
    Kevin.
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Can you submit a bug report for this, with a repro case and a description of which platform you are seeing this on?
     
  3. Kawottex

    Kawottex

    Joined:
    Feb 23, 2019
    Posts:
    11
  4. BusyRoots

    BusyRoots

    Joined:
    Jul 25, 2017
    Posts:
    40