soffes / HotKey

Simple global shortcuts in macOS
MIT License
921 stars 82 forks source link

How to Release Registered Hotkey? #15

Open jsl303 opened 4 years ago

jsl303 commented 4 years ago

It says "You don’t need to think about when handlers are registered and unregistered. This all happens automatically based on the HotKey object’s lifecycle." However, is there a way to deregister and release the hotkey manually?

qwertyyb commented 4 years ago

According to the example, all you need to do is unregister with hotkey = nil or update with hotkey = HotKey(xxxx)

leits commented 4 years ago

Thanks, @qwertyyb. Setting the var to nil works.