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
  3. Dismiss Notice

Keyboard input problems on Linux editor

Discussion in 'Input System' started by halfrafu, Aug 16, 2020.

  1. halfrafu

    halfrafu

    Joined:
    Mar 24, 2018
    Posts:
    3
    Hello everyone.
    After upgrading editor version from 2020.1.0f1 to 2020.1.1f1. I've noticed that spacebar stopped working in game window in editor. Had the same problem with version 2020.1.2f1.

    I've made a simple script in new project that shows me every key press (using Input.GetKeyDown to be exact) to check what's wrong on version 2020.1.2f1. Turns out some keys don't work or register as something else e.g. in order to use spacebar input I need to check for O key. This doesn't happen while testing the same script on version 2020.1.0f1.
    This issue doesn't affect text fields in editor but they're affected by other issue (also occurs in 2020.1.0f1, not sure if it ever worked): I'm only able to type english characters. Pasting text with non-english characters works properly.

    Lists of keys that I've checked so far and didn't register at all:
    • T
    • [ and ] (both square brackets)
    • CapsLock
    • LeftWindows
    • left alt
    • ` (one above the Tab key)
    • Alpha2
    • Alpha3
    And keys that registered as something else:
    • Alpha1 -> BackQuote
    • Alpha4 -> Z
    • Alpha5 -> X
    • Alpha6 -> C
    • Alpha7 -> V
    • Alpha8 -> B
    • Alpha9 -> N
    • Alpha0 -> Quote
    • - -> K
    • = -> Slash
    • = (when pressed together with Shift) -> H
    • ; -> comma
    • ' -> S
    • , -> J
    • . -> L
    • / -> Semicolon
    • Spacebar -> O
    Also I've noticed that in player build from both versions 2020.1.0f1 and 2020.1.0f1 Meta (Windows) keys don't register properly:
    • Left Meta shows me LeftCommand twice while it registers once as LeftWindows in editor version 2020.1.0f1
    • Right Meta shows RightApple twice which doesn't register in editor (both tested versions)

    I'm using Unity on ArchLinux with KDE on Xorg. Please ask if you need more details.
    I guess the same thing happens on Ubuntu as reported here: https://forum.unity.com/threads/jump-input-is-not-working-on-ubuntu-18-04-lts.951654/
     
  2. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Hi @halfrafu , could you file a ticket with the Unity bug reporter? ("Help >> Report a Bug..." in the editor's main menu) Will ensure this ends up in the proper funnel and gets looked at.
     
  3. halfrafu

    halfrafu

    Joined:
    Mar 24, 2018
    Posts:
    3
    Yes, I can do that but I'm not sure whether I should file a single ticket or 3 separate tickets (wrong keys in editor game preview, non-english characters in editor and meta key in player).
     
  4. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Fine to just do a single one. If QA deems it to be three different issues, they'll split it up.
     
  5. Kalani-Kistler

    Kalani-Kistler

    Joined:
    Oct 20, 2019
    Posts:
    1
    Has there been any progress made on this issue? I am having the exact same issue down to the specific keys, in 2 different manjaro-gnome installations, and an ubuntu installation as well.
     
  6. ynotzort

    ynotzort

    Joined:
    Dec 13, 2017
    Posts:
    1
    I have exactly the same issue. Appears on Unity 2020.1.10f1 (Linux). Does not appear in the Windows version. Also does not appear on Unity 2019.4.12f1 (Linux).
     
  7. Fehr

    Fehr

    Joined:
    Mar 3, 2011
    Posts:
    23
    I'm experiencing the same issues on linux mint. The following demonstrates what halfrafu is reporting, though this only just showed up for us going to 2020.1:

    Code (CSharp):
    1. public class InputTester : MonoBehaviour
    2. {
    3.     private string _pressedKeys = string.Empty;
    4.  
    5.     public void OnGUI() => GUILayout.Label(_pressedKeys);
    6.  
    7.     void Update()
    8.     {
    9.         var pressedKeys = new List<KeyCode>();
    10.         foreach (KeyCode vKey in Enum.GetValues(typeof(KeyCode))) {
    11.             if (Input.GetKey(vKey)) {
    12.                 pressedKeys.Add(vKey);
    13.             }
    14.         }
    15.  
    16.         _pressedKeys = string.Concat(pressedKeys);
    17.     }
    18. }
     
  8. Stormrage74

    Stormrage74

    Joined:
    Jan 7, 2019
    Posts:
    3
    Hi,

    Does this thread as any news ?

    I am using 2020.1.11f1 and i am facing the same issue on Debian 10.
    I am using Input System Version 1.0.0 - April 29, 2020.
    I am working with AZERTY French keyboard, system use FRENCH (AZERTY) layout.

    Working with Input System shows problems in detecting keys on keyboard.

    It is not a matter of system layout configuration. ( i tried English layout as well, it did not map the right key )

    Using the Input System listening key, simply show me that it did not detect anything when pressing WASD, QZSD ( french layout ), or arrow keys. Pressing other keys randomly on keyboard show me that lower keys (the last line before space bar) output symbols and numbers.

    Grabbing a steam controller ( the only one i have closely ) show the same behaviour, and i did not touch any key binding for controllers in the input actions, using the default bindings.

    It is a Editor bug only (i think, cannot be 100% sure), when building the game, keys are well mapped ( Q does not seems to work but at this point i cannot tell if this it my fault or not ).

    Same with the controller, after building game, controller worked as well, (despite of left moving, but same thoughts about a wrong configuration, since i did not go into this case)

    I linked my .inputactions file for you to see if something wrong.

    Following the online guide about Input System did not point out tricks about configuration to help me.

    The only thing i find strange is the Input System, when i looked into binding option, 'path' field show in drop down 'By Location of Key US Layout'.

    I am using this mod ( the default one ) because using the others don't help at all.
    And there seems to be no options for changing or add a other layout detection (why ???).

    For the backward story, i come from windows ( with no problem ) to linux for working on unity. I spend quite some time playing around with this version of unity, with this package version, and i'm not going to spend more time on this. Appear to be a waste of time on this (buggy) version.

    My next steps before giving up :
    Downgrade Input System, if i can.
    Downgrade Unity version and using the last Input System, if i can.
    Not using Input System, but i will appreciate not doing that because it appears to be the 'this is the way' method ;)

    If support team need more info about my configuration to help out debug this, i will be pleased to give some.
    In the limit of my knowledge.

    Thanks.

    PS : Sorry for my english
     

    Attached Files:

  9. Stormrage74

    Stormrage74

    Joined:
    Jan 7, 2019
    Posts:
    3
    Hi again,

    Wrong supposition trying to downgrade packages as it seems not possible.

    But, downloading 2019.4.14f1 and restart a fresh project with Input System 1.0.0 --> no Keys binding issue, everything is correctly working.

    I done nothing more, nothing less than in the 2020.1.11f1 version. So it seems to be a bug.

    So i will continue with 2019 as 2020 is not stable.

    ( yes that is the same conclusion of ynotzort )



     
  10. TonzaG

    TonzaG

    Joined:
    Mar 7, 2021
    Posts:
    2
    I am using 2020.1.6f1 in Ubuntu and facing the same issue.
    Is it fixed in 2020.2.7f1 or any other 2020 version?
    or
    Is there any workaround for this?

    Update: As a workaround I am using my PS4 Controller hooked up to my PC running Ubuntu and seems to be working fine with my game development. Hopefully we can get a fix for the keyboard issues in the near future.
     
    Last edited: Mar 7, 2021
  11. TonzaG

    TonzaG

    Joined:
    Mar 7, 2021
    Posts:
    2
    The problem seems to be fixed in 2020.3.0f1 (LTS)