← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #822318]: keyDown not working in 1.1.2 in windows server 2022 and Java 8

 

Question #822318 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/822318

Akash Bhatti posted a new comment:
What you’re seeing is a known limitation with SikuliX 1.1.2 on newer
Windows builds. Windows Server 2022 has tighter rules around synthetic
input, so combinations like

keyDown(Key.SHIFT)
keyDown(Key.RIGHT)


don’t behave the same way they did on 2012.

A couple of workarounds that usually help:

Use type() with modifiers instead of chaining keyDown():

type(Key.RIGHT, Key.SHIFT)  // selects one cell to the right in Excel
type("a", Key.CTRL)         // select all


This is more reliable on newer systems.

Always focus the target window first:

App.focus("Excel")


Without focus, key events are often swallowed.

Run in an interactive session: SikuliX can’t send keys if it’s running
as a Windows service or in a disconnected RDP session. Make sure you’re
in the console session.

Try a newer build: 1.1.2 is quite old. If you can, upgrade to SikuliX
2.0.6 or later — it has fixes for Windows 10/11/2022 environments and
handles modifier keys more consistently. for further detail visit
Attendance Calculator https://attendencecalcualtor.com

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.