SikuliX1 icon indicating copy to clipboard operation
SikuliX1 copied to clipboard

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

Open visionki opened this issue 2 years ago • 4 comments

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

visionki avatar Feb 04 '23 06:02 visionki

SX version?

RaiMan avatar Feb 11 '23 13:02 RaiMan

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

visionki avatar Feb 11 '23 16:02 visionki

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 avatar Aug 28 '23 09:08 visionki

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?

visionki avatar Aug 28 '23 10:08 visionki