단축키 변경: 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
@@ -112,8 +112,8 @@ Prefer narrow utility modules (`utils/file-names.js`, `utils/dom.js`) over broad
- `sortMode``'name'` | `'date'` | `null`
**Keyboard shortcuts** (모두 `e.code` 기준 — 한글 입력 모드에서도 동작):
- `O` — 폴더 열기
- `S` — 이름 변경 실행
- `Cmd+O` — 폴더 열기
- `Cmd+S` — 이름 변경 실행
- `A` — 전체 선택
- `Cmd+Z` — Undo (되돌리기)
- `Cmd+Shift+Z` — Redo (다시하기)
+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();