mirror of
https://github.com/Graylog2/graylog2-server.git
synced 2026-03-13 09:32:21 +08:00
* Add hotkeys provider and usehotkeys hook * refactoring * Improving types. * REmove not needed state in `HotkeysProvider`. * Rename view scope to general. * Categorize undo redo as search and dashboard hotkeys. * Use mantine component to display keyboard keys in modal. * Improve styling of hotkeys modal. * Rename hotkeys to keyboard shortcuts in UI. * Rename `hotKeysCollection` to `hotKeysCollections`. * Adding documentation. * Rename `useHotKeys` hook to `useHotkey`. * Add feature flag for hotkeys functionality. * Add telemetry for hotkeys, rename action keys to make sure we can use them as `app_action_value`. * fix: show only enabled scopes in modal * Make Option type explicit * remove telemetryAppPathname * remove scopes from options object * Do not show browser dialog when saving view, when it is not dirty or loaded. * Cleanup code * Create container for hotkeys modal, to ensure we render related logic only when modal is visible. * Alwyas allow triggering "save search as" action. * Fixing test * Adding test for `HotkeysContianerModal`. * Adding further tests. * Reimplement telemetry. * Adding further test. * Change registered hotkeys. * Update feature flag description. --------- Co-authored-by: Linus Pahl <linus@graylog.com> Co-authored-by: Dennis Oelkers <dennis@graylog.com>
251 B
251 B
Setting up keyboard shortcuts
If you want to add a keyboard shortcut, you need to:
- extend the
hotkeysCollectionsin thehotkeysProvider. - call
useHotkeyhook in the place which provides the functionality you want to execute on keypress.