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.99k stars 184 forks source link

Custom storage for shortcuts #139

Open fredlb opened 1 year ago

fredlb commented 1 year ago

Related to https://github.com/sindresorhus/KeyboardShortcuts/issues/18, I've tried to implement a protocol to allow for custom storage implementations. It still defaults to using UserDefaults unless anything else has been specified before running KeyboardShortcuts.initialize().

You can consider this WIP, since it would probably be nice to add more tests etc, and documentation with examples how to use it.