soffes / HotKey

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

Unregistering Hotkeys #21

Open NoahKamara opened 4 years ago

NoahKamara commented 4 years ago

Hey, I'm writing an OS X app where a user can create sets of hotkeys and then switch the sets so I need to be able to unregister 'non-active' Hotkeys. Is there a way to do this?

NoahKamara commented 4 years ago

My current solution is to just do hotkey.isPaused = true but Im not sure this is a 'good' solution

martinlexow commented 2 years ago

It seems there’s no need to unregister a hot key:

You don’t need to think about when handlers are registered and unregistered. This all happens automatically based on the HotKey object’s lifecycle.