Search Unity

KeyCode.Space or "Jump" is not working on Ubuntu

Discussion in 'Linux' started by m31_alpheratz, Aug 16, 2020.

  1. m31_alpheratz

    m31_alpheratz

    Joined:
    Aug 10, 2020
    Posts:
    6
    Code (CSharp):
    1. foreach(KeyCode vKey in System.Enum.GetValues(typeof(KeyCode))){ if(Input.GetKey(vKey)){ Debug.Log(vKey);
    2. } }
    I try this code to determine what happened. Anytime I press the space bar, log detects it as "O".
    But when I change KeyCode.Space to KeyCode.O, log detects its as SpaceBar after I press "O" or "Space Bar".
    When I install it on an Android phone and use the keyboard on my phone, it works.

    How can I fix it on Input Manager?


    (I use Unity Hub from AppImage and install Unity Editor on it. I don't think Ubuntu version or Unity Editor 2019 version is the main problem)
     
    Last edited: Aug 16, 2020
  2. KevinWelton

    KevinWelton

    Joined:
    Jul 26, 2018
    Posts:
    239
    Does this happen play mode, a standalone build, or both?
     
  3. m31_alpheratz

    m31_alpheratz

    Joined:
    Aug 10, 2020
    Posts:
    6
    I try to install it on Ubuntu, it still works. So I think this only happens in play mode.
     
  4. KevinWelton

    KevinWelton

    Joined:
    Jul 26, 2018
    Posts:
    239
    We have a fix in the pipeline for keyboard mappings in play mode in Linux. Keep on eye on new 2020.2 releases.

    In the meantime, you can report a bug using "Help > Report a Bug". If you do so, please include your keyboard layout if it is not a US keyboard or US layout.
     
    m31_alpheratz likes this.