SikuliX – pressing key combinations

I just wanted to quickly automate a task using my favourite tool SikuliX. Therefore I had to make it press a key combination. Trial and error with the first web-results did not work.

First, because the syntax seems to have changed and second, because I ignored upper and lower case in my test scripts – which SikuliX does not.

Here are some examples of key combinations you can use in SikuliX:

# CTRL+HOME
type(Key.HOME, KeyModifier.CTRL)
 
# ALT+F4
type(Key.F4, KeyModifier.ALT)
 
# CTRL+v
type('v', KeyModifier.CTRL)
 
# CTRL+ALT+ESC
type(Key.ESC, KeyModifier.CTRL+KeyModifier.ALT)

Leave a Reply

Your email address will not be published. Required fields are marked *