[2.0.4] some keyboard commands not recognized by certain programs

Bug #1891391 reported by Zed on 2020-08-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Medium
RaiMan

Bug Description

It looks like for some Windows applications, certain navigation keys (Key.PAGE_UP, Key.PAGE_DOWN, Key.HOME, and Key.END) are not being recognized properly on SikuliX 2.0.x versions.

For example, if you use this keyboard test program https://www.passmark.com/products/keytest/ and trying to use Sikuli to trigger test those keys, they seemingly get ignored. I used 2.0.4 to test but also tried previous 2.0.x versions and they seem to have the same result.

If I go back to the old 1.1.3 version, those same commands appear to work fine and appropriate key code is shown.

For testing, I used Windows 10 1909 64-bit, and both Java 8 and Java 11.

RaiMan (raimund-hocke) on 2020-08-13
Changed in sikuli:
status: New → Opinion
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 2.0.5
summary: - In SikuliX 2.0.4, some keyboard commands not recognized by certain
- programs
+ [2.0.4] some keyboard commands not recognized by certain programs
RaiMan (raimund-hocke) wrote :

SikuliX from beginning internally uses Java AWT Robot, to issue key strokes.

With version 2.0.x we introduced a feature for Windows to automatically detect the keyboard layout (in 1.1.x this was restricted to the US layout by Java) and now issue the key strokes using the Windows native API.

This feature is switched on in the standard. It can be switched off using
Settings.AutoDetectKeyboardLayout = False

which means: fall back to the Java AWT Robot usage with the restriction to the US layout.

I tested on Windows 10 with a NotePad++ window: all mentioned keys work as expected and in both Settings variants (Win10-64(2004), Java 11) (German keyboard layout).

This means, SikuliX sends the keys correctly to Windows.
What certain apps are doing with that simulated keys and how they get the key info is beyond the scope of SikuliX.

Zed (zh2eou) wrote :

Hmm interesting, was not aware of that setting, but it looks like if I disable it the program works. I had multiple keyboard layouts enabled so I tried to remove the all but the US English one but it didn't seem to be related. Anyways, thanks for the info, I can just add this as workaround.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers