type('`') odd behaviour

Asked by Alex Lunyov

Hi,

here is some addition to "type invalid key code" questions collection on Launchpad. May be a bug.

So, when I just started IDE and executed simple code:

     type('`') # there is one key to type, backquote (backtick), that belongs to American QWERTY layout

I got such an error:

*********************************************
[log] TYPE "`"
[error] script [ Безымянный ] stopped with error in line 1
[error] java.lang.IllegalArgumentException ( java.lang.IllegalArgumentException: Invalid key code )
*********************************************

Next, I corrected the command:

     type(u'`')

and got no errors:

*********************************************
[log] TYPE "`"
*********************************************

And at last, I deleted unicode prefix and there were no errors again.

Can't understand.

I use latest 1.1.2 nightly version of SikuliX.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Lunyov
Solved:
Last query:
Last reply:
Revision history for this message
Alex Lunyov (lunyov-av) said :
#1

OK, I've just resolved the problem. Nothing strange, in fact I use two layouts and while I run script in English layout the keystroke is correct. Otherwise it is invalid. So, I have to check the correct layout before I run the script.