Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .resetAll() method #23

Open
sindresorhus opened this issue Aug 8, 2020 · 2 comments
Open

Add .resetAll() method #23

sindresorhus opened this issue Aug 8, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@sindresorhus
Copy link
Owner

Which would reset all the shortcuts in extension KeyboardShortcuts.Name.

This cannot be done until Swift supports static key paths. We could potentially do something with Mirror today, but it's not important enough to do such a hacky workaround.

@sindresorhus sindresorhus added the enhancement New feature or request label Aug 8, 2020
@Yang-Xijie
Copy link

Feature needed!

I set plenty of Shortcuts using their name. But some times these names gone, and I cannot find a way to reset them.

In the current documentation, I find two methods: reset(names: ..) which must use the shortcut name to reset and removeAllHandlers() which just remove handlers except for the shortcuts in UserDefault...

@sindresorhus
Copy link
Owner Author

The current workaround is to follow this to get all the Name's and pass them to .reset(names: …).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants