Page 1 of 1

Interpreting key presses incorrectly

Posted: Mon Dec 19, 2016 7:06 pm
by Zabulon
Can anyone figure out what's happening? Is there something I can set (or reset) to fix this?

If someone can help me remove all traces of the install and my settings, then I'm happy to try a fresh install. I've got through a few upgrades already.

This problem has existed for this install since the beginning.

If it's a bug, I'll report it.

These are the letters that appear:

Code: Select all

asdfghjkl;'`\zxcvbnm,./*
when I type:

Code: Select all

abcdefghijklmnopqrstuv
Even arrow keys and backspace don't work properly.

OS: Ubuntu 16.04.1 LTS (Xubuntu)

I'm using Jump Desktop to connect over ssh tunnel to VNC with Xfce GUI.
Edit: I've just tried it using the built-in VNC client (Remmina) in Ubuntu to connect to the machine, and it shows the exact same behavior. So, I can rule out the it being JumpDesktop's fault.

No other program has this problem.

All mouse functions (including copy-and-paste of text) work fine. There are not other problems using this program except that it misinterprets every key-press.

qBittorrent UI Language set to English.

Re: Interpreting key presses incorrectly

Posted: Tue Dec 20, 2016 7:57 am
by KitKat
Differing keyboard layout on the host/proxy system?

Instead of a-z which are sequential ascii codes its printed the second and third rows of the keyboard..

Re: Interpreting key presses incorrectly

Posted: Tue Dec 20, 2016 8:28 am
by Zabulon
[quote="KitKat"]
Differing keyboard layout on the host/proxy system?

Instead of a-z which are sequential ascii codes its printed the second and third rows of the keyboard..
[/quote]

But why is this only happening in one program?

Re: Interpreting key presses incorrectly

Posted: Tue Dec 27, 2016 4:16 am
by Peter
VNC and all the VNC using remote desktops... they all use otherworldly tricks.

I ran into this issue way too many times.
Check both sides - which layout they use.
On Linux, you can set your current keymap with: setxkbmap en
(For example, thats English US, of course.)

In my case I often have to alt-tab out of my vnc window, alt-shift several times, use setxkbmap a few times, and then it fixes itself.
Sometimes I also have to reconnect, or use a different VNC client (TightVNC, RealVNC, TigerVNC).
It's a mess.

I tried both Tiger/Tight on Linux, nothing changed. RealVNC does work, but it is very pricey.
You can run different VNC servers and clients on each side. I run TigerVNC on the server atm, you can grab the binary and simply run it by hand. It's one of the last free maintained VNC servers for Linux. ( https://bintray.com/tigervnc/stable/tigervnc ). Same for the client. You can use TigerVNC, TightVNC, RealVNC.

Workaround: Use NoMachine [ https://www.nomachine.com/ ] or RDP [ http://www.freerdp.com/ ] .
NoMachine is easier to setup (you have to compile FreeRDP yourself to get the server portion).

Re: Interpreting key presses incorrectly

Posted: Tue Dec 27, 2016 7:26 pm
by Zabulon
Thank you.

[quote="Peter"]…
I ran into this issue way too many times.
…[/quote]

When you've seen this, was it for one application on the system or for more than one / all?

I'm finding it strange that it's just qbitorrent.

Re: Interpreting key presses incorrectly

Posted: Tue Dec 27, 2016 9:23 pm
by KitKat
Probably because qbittorrent is a QT application.
QT can be very weird sometimes..

Re: Interpreting key presses incorrectly

Posted: Wed Dec 28, 2016 10:43 pm
by Peter
I would not blame Qt here. I had this issue on Windows, OS X and basically all around.
It's VNC.

With TigerVNC it barely happens though, and never happens on RealVNC.
But, for RealVNC, you have to prepare your wallet.
(Just use NoMachine then.)

Re: Interpreting key presses incorrectly

Posted: Fri Dec 30, 2016 10:20 pm
by Zabulon
I have determined it is a QT problem. Edit: Well, sort of. Searching shows that there might be a vnc server that plays well with QT, but vnc4server (that I'm using) doesn't. The search continues.

I've done a little searching but haven't found a fix yet.
This is a post about someone having the same issue but not a fix: https://bugs.debian.org/cgi-bin/bugrepo ... bug=814959

To verify it is a problem with QT,  I installed another QT application and it has the exact same problem.

I'll keep searching, but if you know how to fix it, that would be awesome.

I can't tell is it's going to be easier to install a different vnc server or make the one I'm using work correctly.



[quote="KitKat"]
Probably because qbittorrent is a QT application.
QT can be very weird sometimes..
[/quote]

[quote="Peter"]
I would not blame Qt here. …[/quote]

Re: Interpreting key presses incorrectly

Posted: Tue Jan 03, 2017 7:53 am
by Peter
I already told you, switch vnc servers.
Try tigervnc, just run it and it works.

FIXME on this one, but last time I looked arond I found that the vnc4server is old as heck.
Tightvncserver was newer, but if you visit the main site, there is no newer version anymore.
Back to point 1.

Re: Interpreting key presses incorrectly

Posted: Fri Jan 06, 2017 12:30 pm
by Zabulon
Thank you Peter. The workaround of using a different vnc server is fine.

I was just hoping there was a setting or package I could install to actually fix this instead of giving up and using different software. I also wish I understood exactly why it's happening, but you can't always get what you want.

Also (except for the QT issue) I've got everything running how I want and I get nervous that if I install something else, I'm going to break something. There's no package in apt for tigervnc, and I haven't yet found a (recent) good tutorial on how to install it on Ubuntu (I'm on xubuntu, installing remotely). TigerVNC's wiki doesn't include installation instructions. I'm sure I'll figure it out though. It'll just take some searching and reading.