get current keyboard Layout

Asked by Sergey Taranenko

tell me how to know the current keyboard layout?
I found the getCurrentLayout() procedure in API/src/main/java/org/sikuli/script/support/KeyboardLayout.java but it is private.
what am i doing wrong ?

Question information

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

not intended for public use.

Revision history for this message
Sergey Taranenko (setar007) said :
#2

Well, what other methods are there to solve the problem?

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

What is "the problem" that needs to be solved?

How would you know about the keyboard layout without sikuli?

Revision history for this message
Sergey Taranenko (setar007) said :
#4

this work for me:

from java.awt.im import InputContext
def getKeyboardLang():
    return InputContext.getInstance().getLocale().toString()

print getKeyboardLang()