tulskiy / jkeymaster

A library for registering global hotkeys in java with JNA. The goal is to support X11-based platforms, Windows and MacOSX
GNU Lesser General Public License v3.0
234 stars 45 forks source link

Reset or stop hangs the REPL (Clojure) #13

Closed houshuang closed 11 years ago

houshuang commented 11 years ago

I don't know Java so I can't test in Java unfortunately, but when I try to issue .reset or .stop to the provider object in Clojure, the REPL hangs. If I do it in running code, the code continues (since it's multi-threaded), but the keys are not deregistered, and continue to be active...

    May 01, 2013 12:06:36 PM com.tulskiy.keymaster.osx.CarbonProvider$1 run
    INFO: Installing Event Handler
    May 01, 2013 12:06:36 PM com.tulskiy.keymaster.osx.CarbonProvider register
    INFO: Registered hotkey: shift ctrl pressed 1
    May 01, 2013 12:06:40 PM com.tulskiy.keymaster.osx.CarbonProvider$EventHandler callback
    INFO: Received event id: 1
    May 01, 2013 12:06:40 PM com.tulskiy.keymaster.osx.CarbonProvider stop
    INFO: Stopping now
    May 01, 2013 12:06:43 PM com.tulskiy.keymaster.osx.CarbonProvider$EventHandler callback
    INFO: Received event id: 1
houshuang commented 11 years ago

Actually the keys seem to be deregistered fine when running an app, so the fact that it doesn't work in the REPL is not a big problem.