SikuliSharp icon indicating copy to clipboard operation
SikuliSharp copied to clipboard

Is Key class supported?

Open condaa opened this issue 6 years ago • 3 comments

I can't send special keys by Type function such as ENTER, TAB, ESC, SPACE.

condaa avatar Mar 11 '18 16:03 condaa

Nope, but it should be pretty simple to add support for this! Let me know if you'd like information on this (make sure you can compile and run from a cloned version first)

christianrondeau avatar Mar 11 '18 17:03 christianrondeau

why not use native commands. just creating a method?

void type(string key) { SendKeys.Send(key); // native }

pcdigitacao2017 avatar Jun 14 '18 19:06 pcdigitacao2017

@pcdigitacao2017 this is actually a good idea! However, it sounds like writing what Sikuli has been built for... it's probably as simple to pass through the key codes themselves (here: https://docs.oracle.com/javase/7/docs/api/constant-values.html#java.awt.event.KeyEvent.VK_TAB) by escaping them properly (and potentially creating a constants class, or using a builtin one if it matches).

Both solutions would work, I believe.

christianrondeau avatar Jun 14 '18 19:06 christianrondeau