capslock activation/deactivation

Asked by andrea on 2014-06-23

hi,
i am implementing a script that type automatically the login into an application. Before type the username I check if "capslock" is activated on the keyboard. The problem is that when I run the script the second time the SW does not recognize that "capslock" is deactivated. it looks like does not recognize the environment variabile value.
Here a small code that you can use to test the behaviour. Run it the first time with caps on and then check what happen the second time.

def _capslock():
    test=Env.isLockOn(Key.CAPS_LOCK)
    if test:
        popup('CAPS active')
        type(Key.CAPS_LOCK)
    else:
        popup('CAPS non active')

_capslock()

Regards
Andrea

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2014-06-23
Last query:
2014-06-23
Last reply:
2014-06-23
Best RaiMan (raimund-hocke) said : #1

this is a known problem - but no solution or workaround currently.

If this is true with version 1.0.1+ and Java 7+ please report a bug.

andrea (andrea-merli69) said : #2

Hi I think my problem it is related to bug #985395.
I won't open another bug and wait for the solution on 1.1.0 Sikuli Release.

Regards
Andrea

andrea (andrea-merli69) said : #3

Thanks RaiMan, that solved my question.

RaiMan (raimund-hocke) said : #4

Thanks, good finding.

andrea (andrea-merli69) said : #5

Sorry RaiMan is there a probably date for the resolution of the bug?

Thks
Andrea

RaiMan (raimund-hocke) said : #6

It will surely take some additional weeks (if it can be fixed at all).
Currently I have other priorities in SikuliX.