Keyboard commands don't send when AutoDetectKeyboardLayout=True

Bug #1861588 reported by HaTaX
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Invalid
Undecided
Unassigned

Bug Description

Sikuli 2.0.2

I had been previously using SikuliX 1.1.3 and noticed upon updating to 1.1.4 / 2.0.2 that my keyDown/keyUp and type commands were no longer registering in the target application. There were no errors logged in debug and Sikuli did report that it was pressing the desired key but there was no response from the application.

I went digging through the source files and landed on the method 'doKeyPress' in RobotDesktop.java. Looking at how behavior changed between 1.1.3 and 2.0.2 I noticed that when AutoDetectKeyboardLayout=True it will attempt to send the key using 'User32.INSTANCE.SendInput' and otherwise it falls back to the same behavior that 1.1.3 had.

Once I set 'Settings.AutoDetectKeyboardLayout=False' at the start of my script Sikuli started behaving as expected and was able to send key commands into the target application again.

Not sure if this is so much a bug but I've seen numerous reports of people having issues with RDP and Citrix sessions where they needed to run as administrator and other workarounds. Of note the application I am targeting is NOT a remote desktop window or similar application, but it seems to ignore inputs the same as those applications. Perhaps something in the documentation to let people know that some applications might require AutoDetectKeyboardLayout=False, or an option that enforces the old behavior used in versions prior to 1.1.4 that doesn't require disabling auto detection of keyboard layout?

Revision history for this message
Matthias Balmer (mbalmer) wrote :

What keyboard layout you xhave set in Windows?

Revision history for this message
HaTaX (hatax2) wrote :

English (United States) / en_US

Revision history for this message
Matthias Balmer (mbalmer) wrote :

OK, then at least the keyboard layout should not be an issue.

On our side the new behavior works very well under different scenarios (including RDP and Citrix). Can you please give me some additional details about your environment (Windows version, input devices, Java version, virtual or real machine)?

Disclaimer: I'm the author of the layout detection feature and hence very interested in those details :-)

Revision history for this message
Matthias Balmer (mbalmer) wrote :

Oh, and isn't the new implementation working at all or only in some applications?

Revision history for this message
Matthias Balmer (mbalmer) wrote :

Let's move this over to Github:

https://github.com/RaiMan/SikuliX1/issues/305

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.