단축키 변경: S -> Cmd + S, O -> Cmd + O

This commit is contained in:
2026-05-17 23:18:10 +09:00
parent 5948be9c60
commit 2fc48f75ff
3 changed files with 11 additions and 8 deletions
+2 -2
View File
@@ -16,8 +16,8 @@
<aside>
<nav class="sidebar-nav">
<button class="btn btn-warning" id="btn-open">폴더 열기 (O)</button>
<button class="btn btn-success" id="btn-rename" disabled>이름 변경 실행 (S)</button>
<button class="btn btn-warning" id="btn-open">폴더 열기 (O)</button>
<button class="btn btn-success" id="btn-rename" disabled>이름 변경 실행 (S)</button>
</nav>
<section class="file-explorer">
<!-- 추후 구현 -->
+7 -4
View File
@@ -10,12 +10,15 @@ export function initKeyboardShortcuts({
}) {
document.addEventListener('keydown', (e) => {
if (hasOpenModal()) return;
if (isEditableTarget(e.target)) return;
const isMetaOpenOrSave = e.metaKey && (e.code === 'KeyO' || e.code === 'KeyS');
if (isEditableTarget(e.target) && !isMetaOpenOrSave) return;
if (e.code === 'KeyO') {
if (e.metaKey && e.code === 'KeyO') {
e.preventDefault();
btnOpen.click();
} else if (e.code === 'KeyS' && !btnRename.disabled) {
btnRename.click();
} else if (e.metaKey && e.code === 'KeyS') {
e.preventDefault();
if (!btnRename.disabled) btnRename.click();
} else if (e.code === 'KeyA') {
selectAll();
refreshSelection();