← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #243910]: Keyboard shortcut not working as expected

 

Question #243910 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/243910

Description changed to:
Hey there,

I'm trying to minimize a command prompt window by using a keyboard
shortcut (Alt + Space + N) but it's not working as intended. My code is
as follows:

switchApp("cmd.exe")
type("n" + Key.SPACE, KeyModifier.ALT)

My log shows:

[log] App.focus cmd.exe(0) #0
[log] ( Alt ) TYPE " n"

It shows that there is a space before the n, but I don't want that, I
want to execute the full keyboard shortcut. How can I do this?

Thanks.

EDIT: After some experimentation I managed to find a solution:

switchApp("cmd.exe")
type(Key.SPACE, KeyModifier.ALT)
type('n')

That works well and good.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.