@ sign coming out as quote

Asked by Tony Ryan

Hiya,

When I try and get Sikuli to type an @ sign into a text box, it comes out as a quote (") sign. I can get around this when I'm hardcoding by using \" to get an @ sign (the two keys are reversed it seems, US Vs Europe maybe?) but when accepting user input I don't want to have to do a string replace check all the time.

Is there a way to tell Sikuli which keyboard layout I have?

Cheers!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Tony Ryan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

type() is definitely bound to the US key board layout and the developers probably will not change this in the near future.

To type text use paste() instead and divide your actions into paste(text) and type(action-key) like:

type(Key.TAB) # to get to next entry field
paste(content)
type(Key.ENTER)

This always works - apart from some really specific app situations.

Revision history for this message
Tony Ryan (ryant-dnb) said :
#2

A bit awkward, but still better than doing a find/replace I suppose. Cheers, Raiman.