keyDown(Key.SHIFT) not working on Win with Num-Lock on -- switch it off ;-)
**** it is a Java bug, but there is a workaround
Unfortunately, this is a bug of Java robot and we may not be able to fix it. (http://
A workaround is to turn off the num lock.
There will be a new API Env.isLockOn() in RC2 to get the state of locking keys. So one can use Env.isLockOn(
-------
I have this same script for Mac and Windows. On Mac, it works as expected, but it looks like the shift key isn't pressed on Windows.
Have notepad open with text "asdf" and run the code below:
keyDown(Key.SHIFT)
type(Key.LEFT)
type(Key.LEFT)
type(Key.LEFT)
keyUp(Key.SHIFT)
It should highlight "sdf", but on Windows, it only moves the cursor between "a" and "s" as if it only moved left 3 times without shift key down.
Is this a bug? Any work around?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: