Keyboard input problems on Linux editor

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: Jump Input is not working on Ubuntu 18.04 LTS

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.

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).

Fine to just do a single one. If QA deems it to be three different issues, they’ll split it up.

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.

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).

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:

public class InputTester : MonoBehaviour
{
    private string _pressedKeys = string.Empty;

    public void OnGUI() => GUILayout.Label(_pressedKeys);

    void Update()
    {
        var pressedKeys = new List<KeyCode>();
        foreach (KeyCode vKey in Enum.GetValues(typeof(KeyCode))) {
            if (Input.GetKey(vKey)) {
                pressedKeys.Add(vKey);
            }
        }

        _pressedKeys = string.Concat(pressedKeys);
    }
}

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 :wink:

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

6504258–732549–debug.txt (30.8 KB)

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 )

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.

The problem seems to be fixed in 2020.3.0f1 (LTS)