Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.78k stars 516 forks source link

Keyboard input wrong on Debian 11 Hyper-V machine when using MeshCentral webstream #4677

Open krzysztofakc opened 1 year ago

krzysztofakc commented 1 year ago

Describe the bug

When you control a device (using the Agent) on which a remote connection to a Debian 11 Hyper-V virtual machine is active, the keyboard layout on that remote connection is incorrect. It's fine, however, on endpoint.

Using the number '1' on the keyboard gives you the letter 'n', and '2' gives you the letter 'm'. The digits '1', '2', '3' on the numeric keypad represent the letters 'c' to 'b'. I haven't checked further.

The problem does not occur when I walk up to the computer and use the physically connected keyboard. TeamViewer, AnyDesk and RDP are doing just fine.

To Reproduce

NOTE: I tested this on four different virtual machines with four different languages and keyboard layouts to eliminate human error.

Steps to reproduce the behavior:

  1. Install MeshAgent on endpoint and connect.
  2. On endpoint, open remote connection to new Debian vm in Hyper-V.
  3. Install Debian 11 on Hyper-V vm.
  4. Keyboard layout working fine during installation.
  5. Keyboard layout wrong after installation. Impossible to login.

Expected behavior Should represent keys as they are.

Additional context

At first I thought it was a matter of xkbmap or a corrupted iso. However, since the problem does not occur when using other remote desktop software, and also when I physically use the keyboard, I report this as a bug.

si458 commented 1 year ago

just a random throught,

have u tried turning on and off num lock? switching it on then typing, switching it off then typing etc?

i have a strange one where every so often, i press 2,4,6,8 on my keypad and its sending the arrow keys, but turn numlock off and it then send correctly

krzysztofakc commented 1 year ago

Yeah, numlock or not issue is still there

krayon007 commented 1 year ago

Have you tried changing the value of "use remote key map" on the settings of remote desktop?

krayon007 commented 1 year ago

Also, am I understanding this right.. You are remoting to the windows host, and then accessing the debian guest OS while connected to the windows host?

krzysztofakc commented 1 year ago

Have you tried changing the value of "use remote key map" (...)

Yeah

You are remoting to the windows host, and then accessing the debian guest OS while connected to the windows host?

Exactly

krayon007 commented 1 year ago

I assume the keyboard layout that you configured you linux guest is the same keyboard layout that the host OS is configured with? The only time I've seen an issue like this, was when you use Virtual Box, with a guest OS with a different keyboard layout as the host OS. (It works fine with VM ware, I only observed this particular issue with Virtual Box, as they were doing something different with keyboard capture between guest and host)

I may have to play around with Hyper-V and see if I find something similar going on.

RedMageKnight commented 1 year ago

I'd also like to express that I am also experiencing this same exact issue in the same type of environment (using Hyper-V, remoting into the host that has the guest OS being accessed on, trying to type into the VM, etc.). Was anything figured out in regards to this by chance?

immi1988 commented 1 year ago

I'm facing the same issue on my laptop keyboard. In windows host os my keyboard works as expected. In Linux VBOX I receive only the keyboard, like if I press in Windows "FN" keys.

immi1988 commented 1 year ago

The solution for me was: I've removed the checkbox "PAE/NX"

SirLagz commented 1 month ago

I have also just run into the same issue. Debian Host workstation machine using Mesh Central to install a 3CX ISO on a windows server 2019 that I was RDPing to from a Windows 10 box. During install and after first boot, the keymapping was wrong.