You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we have hotkeys (shortcuts) in many apps and components. It includes:
Setting the global hotkey listener taking into account a11y, macOS, and focus
Showing the keymap
While setting the hotkey listener is covered by useHotkey, showing "Keyboard shortcuts" is implemented manually by apps.
Files
Talk
It results in the following problems:
Each app must implement the settings section again
Each app should include global shortcuts like new n</kbd< for App Navigation toggle
Consistency and relevance:
Design consistency
Open dialog by ?(not implemented by Talk)
macOS - Ctrl is replaced with Cmd on macOS (not implemented by Files)
Manual update - after adding the hotkey developers should not forget to add it to the docs (especially with global hotkeys)
Proposal
Add a global shortcut manager together with useHotkey
When registering a hotkey, allow defining:
Description, e.g. Select all files
Section, e.g. Actions
App (can be defined automatically from NcContent), e.g. Files or Global for all-apps
Store the fact of hotkey registration globally in window
Add components <NcHotkeys> and <NcHotkeysDialog> with the list of hotkeys and ?
Implementation notes
We might use useHotkey to handle the fact of (un)registration. But some hotkeys are registered only in a specific context like a call in Talk. So we don't know about a hotkey in advance.
n
hotkey to toggle navigation #6311Problem
Currently, we have hotkeys (shortcuts) in many apps and components. It includes:
While setting the hotkey listener is covered by
useHotkey
, showing "Keyboard shortcuts" is implemented manually by apps.It results in the following problems:
Proposal
Add a global shortcut manager together with
useHotkey
Select all files
Actions
NcContent
), e.g.Files
orGlobal
for all-appswindow
<NcHotkeys>
and<NcHotkeysDialog>
with the list of hotkeys and ?Implementation notes
We might use
useHotkey
to handle the fact of (un)registration. But some hotkeys are registered only in a specific context like a call in Talk. So we don't know about a hotkey in advance.Instead, we can add an app-level composable like
Then
useHotkey
should refer to a registered app hotkey (via id or a new composable wrapper).Vue
Implementing it as a composable allows automatic unregistration and
useHotkey
integration.But the functionality might make sense even without Vue. Maybe it should be also available outside composables and the vue library.
The text was updated successfully, but these errors were encountered: