mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 12:21:10 +02:00
✨ feat(matrix-web): add keyboard shortcuts for quick actions
- Cmd/Ctrl + K: Open search dialog - Cmd/Ctrl + N: Open new chat dialog Improves keyboard-driven navigation for power users. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b097d89318
commit
5a3082686e
1 changed files with 14 additions and 0 deletions
|
|
@ -29,6 +29,20 @@
|
|||
sidebarOpen = false;
|
||||
}
|
||||
});
|
||||
|
||||
// Keyboard shortcuts
|
||||
window.addEventListener('keydown', (e) => {
|
||||
// Cmd/Ctrl + K = Search
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
|
||||
e.preventDefault();
|
||||
showSearch = true;
|
||||
}
|
||||
// Cmd/Ctrl + N = New chat
|
||||
if ((e.metaKey || e.ctrlKey) && e.key === 'n' && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
showCreateRoom = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function toggleSidebar() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue