diff --git a/readme.md b/readme.md index 85d9c89..7e04262 100644 --- a/readme.md +++ b/readme.md @@ -126,6 +126,10 @@ final class PreferencesViewController: NSViewController { See [`NSMenuItem#setShortcut`](https://sindresorhus.com/KeyboardShortcuts/Extensions/NSMenuItem.html). +#### Dynamic keyboard shortcuts + +Your app might need to support keyboard shortcuts for user-defined actions. Normally, you would statically register the keyboard shortcuts upfront in `extension KeyboardShortcuts.Name {}`. However, this is not a requirement. It's only for convenience so that you can use dot-syntax when calling various APIs (for example, `.onKeyDown(.unicornMode) {}`). You can create `KeyboardShortcut.Name`'s dynamically and store them yourself. + ## FAQ #### How is it different from [`MASShortcut`](https://github.com/shpakovski/MASShortcut)?