feat(gui): add keyboard shortcuts guide dialog (#2278)

* feat(gui): add keyboard shortcuts guide dialog

* feat(gui): add dedicated keyboard shortcuts dialog
This commit is contained in:
Rahul aswal
2026-01-16 05:04:40 +05:30
committed by GitHub
parent 21d02e7dae
commit 340d932ae1
+33
View File
@@ -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,
});
}