Skip to content

VK_PACKET ignored by VNC viewer for Windows #1847

Description

@svenssonaxel

Describe the bug
MS Windows has a special virtual keycode (VK) called VK_PACKET that indicates that the scan code is to be interpreted as a character code instead. This keycode is frequently used by applications that inject key events. It appears that VNC viewer ignores this keycode and sends no key events to the server. This bug likely also caused #1818.

To Reproduce
Steps to reproduce the behavior:

  1. In Keepass 2, create an entry with password "a'a^a`a~a.
  2. In Windows, select Swedish keyboard layout.
  3. Connect to a remote server using Tiger VNC client and, on the remote server, open a text editor.
  4. Use Keepass 2 autotype feature to type the password into the VNC client.
  5. Notice the text aaaaa appearing in the remote server's text editor.

Expected behavior
The text "a'a^a`a~a should appear.

Client (please complete the following information):

  • OS: Windows 10 Pro
  • VNC client: TigerVNC
  • VNC client version: 1.12.0

Server (please complete the following information):

  • OS: Debian
  • VNC server: x11vnc
  • VNC server version: 0.9.16
  • Server downloaded from: NixOS
  • Server was started using: x11vnc -N -forever -loop100 -usepw -nevershared -clear_keys -v

Additional context

  • My guess is that Keepass 2 will use VK_PACKET on any keyboard layout when auto-typing characters not found in that keyboard layout.
  • You may add -pipeinput "reopen:cat - > /tmp/keys.in.fifo" to the x11vnc arguments to get a text stream of the key events received by the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions