RaiMan / SikuliX1

SikuliX version 2.0.0+ (2019+)
https://sikulix.github.io
MIT License
2.74k stars 350 forks source link

Key.UP is mapped to the number 8 of the keypad #565

Open visionki opened 1 year ago

visionki commented 1 year ago

I'm using the screen.keyDown(Key.UP) function, hoping to press the UP of the keyboard arrow keys, but he does not work, I used the keyboard detection tool to find that the press to the numeric keyboard 8, please how to solve ? image

RaiMan commented 1 year ago

SX version?

visionki commented 1 year ago

I just tested it again and found it was normal. Maybe I was wrong?

visionki commented 1 year ago

The version I use is:

        <dependency>
            <groupId>com.sikulix</groupId>
            <artifactId>sikulixapi</artifactId>
            <version>2.0.5</version>
        </dependency>

He has shown up again and I don't know what is causing it, my code is as follows:

    @Test
    void click() {
        Screen screen = Screen.getScreen(1);
        screen.keyDown(Key.UP);
        screen.keyUp();
    }

image

This is the site I tested : https://www.zfrontier.com/lab/keyboardTester or https://keyboard.bmcx.com/

visionki commented 1 year ago

I tried to toggle with NUM_LOCK, but it seems that this button is also not working correctly。

    @Test
    void click() {
        Screen screen = Screen.getScreen(1);
        screen.keyDown(Key.NUM_LOCK);
        screen.keyUp();
        screen.keyDown(Key.UP);
        screen.keyUp();
    }

image

Does it have anything to do with my keyboard device? My keyboard is 87 keys. Or maybe it has to do with the region?