Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoType -> VMWare Horizon Remote Desktop results in all lowercase keys #6566

Closed
jdix531 opened this issue May 27, 2021 · 9 comments
Closed

Comments

@jdix531
Copy link

jdix531 commented May 27, 2021

Overview

Steps to Reproduce

  1. Be running on ubuntu 20.10
  2. Use autotype to type into a vmware horizon remote desktop session. To be really specific, I am right clicking the entry, hovering "perform autotype sequence", selecting {PASSWORD} only option.

Expected Behavior

Passwords are typed as they are in the database.

Actual Behavior

Passwords are all "lowercased" (including symbols!).
ie. "ThisP@$$w0rd!" -> "thisp244w0rd1"

Context

Autotype works fine in several other local applications.
There are a few auto-type issues open but they seem a little different, mostly about getting a different character entirely.
My keyboard is a bit fanciful: Kinesis Advantage 2, and I have a second plugged in that I use for gaming WASD code keyboard.

KeePassXC - Version 2.6.4
Revision: 34a78f0

Qt 5.14.2
Debugging mode is disabled.

Operating system: Ubuntu 20.10
CPU architecture: x86_64
Kernel: linux 5.8.0-53-generic

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey
  • Secret Service Integration

Cryptographic libraries:

  • libgcrypt 1.8.5
@jdix531 jdix531 added the bug label May 27, 2021
@droidmonkey
Copy link
Member

droidmonkey commented May 27, 2021

This is almost certainly not us. Check that your keyboard settings in the VM are compatible with what the host keyboard is set to. Your physical keyboard is not relevant, but the keyboard keymap is relevant (eg language).

We also made a ton of changes in develop for Linux autotype. Try out s snapshot to see if the issue is fixed: https://snapshot.keepassxc.org

@josh-dix
Copy link

I'll try that development snapshot and let you know. I'll check the languages too.

I'll let you know, thanks!

@jdix531
Copy link
Author

jdix531 commented May 29, 2021

@droidmonkey using the latest snapshot did not resolve the issue. I verified both keyboards and systems languages were English US for source (ubuntu) and target (windows vm). Any thoughts? I'd be fine closing the issue if you're convinced it isn't something that is keepassxc's fault or purview, I understand that.

@droidmonkey
Copy link
Member

Yah there is nothing further we would do to resolve this unfortunately. We've invested a lot of energy in Auto-Type and there are a ton of edge cases like this that usually dead-end without resolution. You can leave this open if anyone else wants to setup a test environment to replicate and fix.

@michaelk83
Copy link

FWIW, this looks like the modifiers aren't being passed through. Specifically, the Shift key. Maybe some setting in VMWare is flitering it out?

Another thing that was discussed in a similar issue is scancode vs Unicode modes. Shift and other specific keys may be failing in scancode mode if their scancodes are either dropped or not recognized for some unknown reason. But in Unicode mode, the final characted is passed instead, so this problem shouldn't occur.

@chenxiaolong
Copy link

chenxiaolong commented Jun 21, 2021

I've noticed the same thing on Windows 10 with KeePassXC 2.6.6, both with VMware and the Supermicro IPMI remote console (Firefox HTML5). Keepass 2 does auto-type the same entry correctly though. If I get a chance, I'll try to take a look at how they implement auto-type.

@chenxiaolong
Copy link

chenxiaolong commented Jun 21, 2021

At least on Windows, it seems the behavior difference between KeePassXC and KeePass2 is different due to how SendInput is being called. (I can move this to a separate issue if needed since the OP is running Ubuntu and I'm not sure that the reason we're seeing the same issue is from the same code.)

For the password TeSt:

KeePassXC sends (with KEYEVENTF_UNICODE):

  • T (84) down
  • T (84) up
  • e (101) down
  • e (101) up
  • S (83) down
  • S (83) up
  • t (116) down
  • t (116) up

KeePass2 sends (without KEYEVENTF_UNICODE):

  • VK_LSHIFT down
  • T (84) down
  • T (84) up
  • VK_LSHIFT up
  • E (69) down
  • E (69) up
  • VK_LSHIFT down
  • S (83) down
  • S (83) up
  • VK_LSHIFT up
  • T (84) down
  • T (84) up

Looks like KeePass2's SendInputExt.TrySendCharByKeypresses function tries to split out the modifiers like this using the VkKeyScan API. If that doesn't work, then it uses the same KEYEVENTF_UNICODE method that KeePassXC does. I assume that this difference matters to applications that are able to detect raw key presses (like VM/physical server consoles)?

EDIT: The Supermicro HTML5 IPMI console uses an old version noVNC library, which explicitly lowercases the inputted character if the javascript KeyboardEvent.shiftKey property says that shift is not pressed: https://github.com/novnc/noVNC/blob/e8986fa0692705fa890aed02e08b6844e535eb06/include/keyboard.js#L208-L210.

It would be awesome if KeePassXC could support sending scan-code-based events, though it would primarily be used for working around broken applications and I can definitely see that being a maintenance burden.

@droidmonkey
Copy link
Member

@chenxiaolong nice finds, the issue tracking your findings is #1833. Can you port your comment over to that one please?

@droidmonkey
Copy link
Member

Resolved in 2.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants