From 340d932ae16ecce99d8f56002f03ba41d9bedcf6 Mon Sep 17 00:00:00 2001 From: Rahul aswal Date: Fri, 16 Jan 2026 05:04:40 +0530 Subject: [PATCH] feat(gui): add keyboard shortcuts guide dialog (#2278) * feat(gui): add keyboard shortcuts guide dialog * feat(gui): add dedicated keyboard shortcuts dialog --- src/gui/src/UI/keyboardshortcut.js | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/gui/src/UI/keyboardshortcut.js diff --git a/src/gui/src/UI/keyboardshortcut.js b/src/gui/src/UI/keyboardshortcut.js new file mode 100644 index 000000000..96382052a --- /dev/null +++ b/src/gui/src/UI/keyboardshortcut.js @@ -0,0 +1,33 @@ +import UIWindow from './UIWindow.js'; + +export async function openKeyboardShortcuts () { + const shortcuts = [ + { key: 'Ctrl + ,', action: 'Open Settings' }, + { key: 'Ctrl + K', action: 'Open Search' }, + { key: 'Ctrl + B', action: 'Toggle Sidebar' }, + ]; + + const container = document.createElement('div'); + container.style.padding = '20px'; + + const title = document.createElement('h2'); + title.innerText = 'Keyboard Shortcuts'; + + const list = document.createElement('ul'); + shortcuts.forEach((s) => { + const li = document.createElement('li'); + li.innerText = `${s.key} — ${s.action}`; + list.appendChild(li); + }); + + container.appendChild(title); + container.appendChild(list); + + await UIWindow({ + title: 'Keyboard Shortcuts', + body_content: container, + width: 500, + height: 400, + init_center: true, + }); +}