Add keyboard shortcut UX and command palette interactions
This commit is contained in:
1 parent
72ea3609bb
commit
e2445980f9
11 files changed
+267
-2
No files matched your search
@@ -20,6 +20,7 @@
|
||||
<button id="exportBtn" aria-label="Export Schemeta JSON file">Export JSON</button>
|
||||
<button id="autoLayoutBtn" aria-label="Run automatic layout">Auto Layout</button>
|
||||
<button id="autoTidyBtn" aria-label="Run automatic tidy layout">Auto Tidy</button>
|
||||
<button id="shortcutsBtn" aria-label="Show keyboard shortcuts">Shortcuts</button>
|
||||
<button id="undoBtn" title="Undo (Ctrl/Cmd+Z)">Undo</button>
|
||||
<button id="redoBtn" title="Redo (Ctrl/Cmd+Shift+Z)">Redo</button>
|
||||
<label class="inlineSelect">
|
||||
@@ -294,6 +295,37 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="shortcutsModal" class="modal hidden" role="dialog" aria-modal="true" aria-labelledby="shortcutsTitle">
|
||||
<div class="modalCard compactModal">
|
||||
<div class="modalHead">
|
||||
<h3 id="shortcutsTitle">Keyboard Shortcuts</h3>
|
||||
<button id="closeShortcutsBtn">Close</button>
|
||||
</div>
|
||||
<div class="shortcutGrid">
|
||||
<div><kbd>Ctrl/Cmd + Z</kbd><span>Undo</span></div>
|
||||
<div><kbd>Ctrl/Cmd + Shift + Z</kbd><span>Redo</span></div>
|
||||
<div><kbd>Ctrl/Cmd + K</kbd><span>Open command palette</span></div>
|
||||
<div><kbd>F</kbd><span>Focus current selection</span></div>
|
||||
<div><kbd>Space</kbd><span>Rotate selected component(s)</span></div>
|
||||
<div><kbd>Space + Drag</kbd><span>Pan canvas</span></div>
|
||||
<div><kbd>Alt + Enter</kbd><span>Apply selected editor</span></div>
|
||||
<div><kbd>Alt + C</kbd><span>Connect selected pin to chosen net</span></div>
|
||||
<div><kbd>Esc</kbd><span>Close modal / clear selection</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="commandModal" class="modal hidden" role="dialog" aria-modal="true" aria-labelledby="commandTitle">
|
||||
<div class="modalCard compactModal">
|
||||
<div class="modalHead">
|
||||
<h3 id="commandTitle">Command Palette</h3>
|
||||
<button id="closeCommandBtn">Close</button>
|
||||
</div>
|
||||
<input id="commandInput" placeholder="Type a command..." aria-label="Command input" />
|
||||
<div id="commandList" class="commandList" role="listbox" aria-label="Command results"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module" src="/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user