sindresorhus / KeyboardShortcuts

⌨️ Add user-customizable global keyboard shortcuts (hotkeys) to your macOS app in minutes
https://swiftpackageindex.com/sindresorhus/KeyboardShortcuts/documentation/keyboardshortcuts/keyboardshortcuts
MIT License
1.95k stars 181 forks source link

Registering / Enabling shortcuts now returns a @discardable Bool to know whether it worked or not #92

Closed eternalstorms closed 2 years ago

eternalstorms commented 2 years ago

Also adds an "isEnabled" calculated property to Shortcut, and the appropriate .shortcutIsEnabled(_ : ) function to KeyboardShortcuts.

Makes var isTakenBySystem public so it can be used for "default" shortcuts created by an app, which makes us able to provide alternatives on startup.

This is non-breaking.

=== I squashed the 4 local commits beforehand, but I'm not sure if it worked, this is my first pull request on GitHub. It still shows me 4 commits instead of one.

eternalstorms commented 2 years ago

closed because I effed up the squashing. retrying.