sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37518
[Bug 1566637] Re: Hotkey handlers do not properly clean up
tested with same environment:
why do you think, the hotkeys are not reset?
--- this is my test:
Debug.on(3)
def handler(e):
print "***** in handler"
Env.addHotkey('1', 0, handler)
for i in range(20):
print "*** lap:", i
wait(1)
--- and this is the output
[debug] Jython: requested to use as default region: R[0,0 1280x800]@S(0)
[debug] JythonScriptRunner: runPython: running script from IDE:
/Users/raimundhocke/Desktop/SikuliX/testFFHandler.sikuli
[debug] HotkeyManager: add Hotkey: 1 (49, 0)
*** lap: 0
*** lap: 1
*** lap: 2
*** lap: 3
[debug] AbortKey was pressed
[debug] AbortKey was pressed, but nothing to stop here ;-)
[debug] Sikulix: cleanUp: 0
java.lang.InterruptedException: sleep interrupted
.... more traceback (fixed in 1.1.1)
at org.sikuli.script.Sikulix.cleanUp(Sikulix.java:485)
at org.sikuli.ide.SikuliIDE$ButtonRun$1.run(SikuliIDE.java:2385)
[debug] HotkeyManager: reset - removing all defined hotkeys.
[debug] removed (49, 0)
** Changed in: sikuli
Status: New => Opinion
** Changed in: sikuli
Assignee: (unassigned) => RaiMan (raimund-hocke)
** Changed in: sikuli
Milestone: None => 1.1.1
** Changed in: sikuli
Milestone: 1.1.1 => 1.1.0
** Summary changed:
- Hotkey handlers do not properly clean up
+ [1.1.0] Hotkey handlers do not properly clean up
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1566637
Title:
[1.1.0] Hotkey handlers do not properly clean up
Status in Sikuli:
Opinion
Bug description:
OS: Mac OS X El Capitan 10.11.3 (15D21)
Sikuli 1.1.0
When you cancel a script use CMD+SHIFT+C (Mac) the Hotkeys remain
active.
e.g.
#START SCRIPT
def doClick(some_location):
last_mouse_location = Env.getMouseLocation()
click(some_location)
mouseMove(last_mouse_location)
def click_location(event):
doClick(Location(100, 100))
Env.addHotkey('1', 0, click_location)
#END SCRIPT
Now run the sikuli script. If you cancel the script with CMD+SHIFT+C
pressing the number 1 key will still execute the hotkey. I believe
this should Env.removeHotkey all of the registered hotkeys if the
script is canceled.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1566637/+subscriptions
References