[2.0.0] An error occurs if you execute the type command without opening the IDE

Bug #1852823 reported by Nobunaga Oda

This bug report was converted into a question: question #687926: [2.0.x] Windows: type() problems running from commandline --- due to wrong active keyboard layout.

10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
Invalid
Undecided
Unassigned

Bug Description

Hello.
Executing the following script from the command line results in an error.
It runs normally when run from the IDE.
How can I solve it?

Environment:
------------
OS Version: Windows 10 Home 1809(17763.864)
Sikuli version: 2.0.0
Java version: openjdk version "12.0.2" 2019-07-16

Script:(sikulix-test.sikuli ---> sikulix-test.py)
-------------------------------------------------
1 type('r', Key.WIN)

Run Command:
------------
C:\projects\sikulix-test>java -jar C:\sikulix\sikulix-2.0.0.jar -r sikulix-test.sikuli

Output:
-------
[log] ( メタ ) TYPE "r"
[error] script [ sikulix-test ] stopped with error in line 1
[error] java.lang.IllegalArgumentException ( java.lang.IllegalArgumentException: Key: Not supported character: r )
[error] --- Traceback --- error source first
line: module ( function ) statement
1: main ( <module> ) type('r', Key.WIN)
[error] --- Traceback --- end --------------

Revision history for this message
Mychajlo Chodorev (ralfeus) wrote :

I had same issue. It can be due to wrong active keyboard layout. I had the issue when I tried to type('s', Key.CTRL) whilst Ukrainian layout was active, which has no latin symbols

Revision history for this message
Nobunaga Oda (cochrane80) wrote :

Hello, Mychajlo Chodorev.

Thank you for providing information.
Run [Settings] > [Time & Language] > [Language] > [Spelling, typing, & keyboard settings] >
[Advanced keyboard settings] on Windows 10.
When [Override for default input method] was changed to [Use language list (recommended)],
no error occurred!

Thank you very much!

Changed in sikuli:
status: New → Invalid
Changed in sikuli:
status: Invalid → New
status: New → Confirmed
Revision history for this message
RaiMan (raimund-hocke) wrote :

This is a helpful question

Changed in sikuli:
status: Confirmed → Invalid
Revision history for this message
Priscilla Serrano Gonçalves Kitice (psgkitice) wrote :

Hello, RaiMan!
I want to know the type(key) correction forecast because I have this problem in version 2.0.4.
I need this feature to get my work going.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.