KeyboardShortcuts icon indicating copy to clipboard operation
KeyboardShortcuts copied to clipboard

Custom UserDefaults suite

Open Maschina opened this issue 7 months ago • 3 comments

This PR adds the capability to define a custom UserDefaults to support App Groups and access group containers.

I am using KeyboardShortcuts in an environment with App Groups. The shared UserDefaults shall also include the defined shortcuts.

Maschina avatar Apr 12 '25 20:04 Maschina

Being able to substitute UserDefaults suites is valuable in other respects. In an app where I use the package, for unit tests and integration tests we use a custom suite for prefs, and it would be useful to be able to use the same suite with KeyboardShortcuts.

orchetect avatar Apr 12 '25 21:04 orchetect

I am just realizing that event streams also require observations. Will make another commit for that.

Maschina avatar May 03 '25 22:05 Maschina

Make sure you manually test it in the example app and also a real app to ensure it doesn't introduce any new bugs. I'm a little bit nervous about large changes like this as we have no real tests.

sindresorhus avatar May 06 '25 09:05 sindresorhus