Skip to content

Commit 3f02ce0

Browse files
authored
Merge pull request #7514 from nextcloud-libraries/refactor/nc-modal-ts
refactor(NcModal): migrate to Typescript and script-setup
2 parents e69604f + 0bdf7ec commit 3f02ce0

File tree

9 files changed

+772
-935
lines changed

9 files changed

+772
-935
lines changed

docs/composables/useHotKey.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ where:
2222
See [KeyboardEvent.key Value column](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values) for possible values
2323
- `callback`: a function to be called when the key is pressed. Before called, it will be checked whether keyboard shortcuts are disabled, or interactive element is currently focused, or whether options should be applied
2424
- `options`: options to be applied to the shortcut:
25-
- `push`: whether the event should be triggered on both keydown and keyup (default: `false`)
26-
- `prevent`: prevents the default action of the event (default: `false`)
27-
- `stop`: prevents propagation of the event in the capturing and bubbling phases (default: `false`)
2825
- `ctrl`: whether the Ctrl key (Cmd key on MacOS) should be pressed (default: `false`)
2926
- `alt`: whether the Alt key should be pressed (default: `false`)
3027
- `shift`: whether the Shift key should be pressed (should be explicitly defined as `true`|`false` if needed)
28+
- `push`: whether the event should be triggered on both keydown and keyup (default: `false`)
29+
- `prevent`: prevents the default action of the event (default: `false`)
30+
- `stop`: prevents propagation of the event in the capturing and bubbling phases (default: `false`)
3131
- `caseSensitive`: whether specific case should be listened, e.g. only 'd' and not 'D' (default: `false`)
32+
- `allowInModal`: whether key strokes should also be handled while a modal is shown (default: `false`)
33+
By default this is disabled to not trigger hotkeys of an app while the app is overlaid by a modal.
3234
- `stopCallback`: a callback to stop listening to the event
3335

3436
### Playground

0 commit comments

Comments
 (0)