From 5a3082686e41c48aabb3121d68894e8e2ece2194 Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:51:12 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(matrix-web):=20add=20keyboard?= =?UTF-8?q?=20shortcuts=20for=20quick=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .../apps/web/src/routes/(app)/chat/+page.svelte | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/matrix/apps/web/src/routes/(app)/chat/+page.svelte b/apps/matrix/apps/web/src/routes/(app)/chat/+page.svelte index 0a92b65d2..8bf8e8deb 100644 --- a/apps/matrix/apps/web/src/routes/(app)/chat/+page.svelte +++ b/apps/matrix/apps/web/src/routes/(app)/chat/+page.svelte @@ -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() {