Ubuntu – Input delay when using two keyboards under Ubuntu 18.04 (Xorg)

18.04bluetoothkeyboardxorg

Ubuntu 18.04. Due to the ergonomics benefit, I use two bluetooth keyboards at the same time for the same local machine. Under Ubuntu Wayland environment, typing works perfectly. Key strokes appear at once on the screen. But on Ubuntu (Xorg) environment, if only one keyboard, it works. But typing with two keyboards, left hand with the first keyboard, right hand with the second keyboard, display of characters on screen are delayed. Behavior is like ssh over slow network to a remote machine.

So now, I use Ubuntu Wayland for typing with two keyboards to work. How can I fix it works for Ubuntu (Xorg) too? Because I depend on Ubuntu Xorg for some applications like Skype, VMWare, etc… to function correctly.
Thanks

Best Answer

After being annoyed by this bug for a long time, i started digging and found a workaround. The bug is only present when i'm using certain keyboard layouts ("Portugues (Brasil)") and was not present when i changed the layout to US and language to English (need to set them both to English).

After some digging i found out the culprit is the ScrollLock key and that can be fixed by editing the layout file, which in my case is found at /usr/share/X11/xkb/symbols/br. The only modification i did was to remove or comment the line: modifier_map Mod3 { Scroll_Lock }; After that, set the language and layout back to Portugues (Brasil) and the problem was gone!

PS: I tried this on Fedora, but i believe it will work on Ubuntu.