Key.TAB not behaving as expected in a text box.

Asked by David Eells

A member of my team is working to automate a testing routine on a piece of software. On doing inputs, they are making use of


to move from one box to the next in sequence. However, it's not doing anything.

Base OS: Windows 10
Application: access via Citrix receiver (sorry, can't be more specific)

Put another way:

Given the code:

This should result in the first two fields coming in as:

Field 1 | Field 2
abc |DEF

Instead, we're getting:

Field 1 | Field 2
abcDEF | <blank>

When they attempt to perform the task manually (not via Sikuli script), the Tab key on their keyboard works to move from field to field.

Key.LEFT and Key.RIGHT have similar issues (when operated by hand, moves from field to field; when automated does nothing)

Question: does <type(Key.TAB)> send a different code to Windows than what a standard 101/102 Key US keyboard sends?

Question information

English Edit question
SikuliX Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :

Which Java?
Which SikuliX?

Revision history for this message
David Eells (spaceman2901) said :

SikuliX 2.0.4 on Java 8.0_281

Revision history for this message
Best RaiMan (raimund-hocke) said :

On Windows the keyboard layout is automatically evaluated.
But this might somehow clash with your Citrix environment (... but I have no experiences).

You might try with
Settings.AutoDetectKeyboardLayout = False

But then you have to take care, that you work with the standard US keyboard layout.

Revision history for this message
David Eells (spaceman2901) said :

That fixed the problem. I guess the Citrix keyboard virtualization didn't like the auto-detected layout. Thank you!

Revision history for this message
David Eells (spaceman2901) said :

Thanks RaiMan, that solved my question.