fix(CAD): 되돌리기 · 다시 하기 한글 자판 대응 · M02 화면 ↶ ↷ 단추(214-1)

- Ctrl+Z · Y · Shift+Z · S · A 를 자판 자리(code)로 판정 — 한글 자판 「ㅋ」·「ㅛ」 · Shift 대문자 대응
- 한글 조합 중에도 Ctrl 단축키는 먹음
- 제목줄 없는 M02 화면(양식 편집 · 구조물 카드)은 우하단 탐색 막대에 되돌리기 · 다시 하기 단추
- 포인터가 CAD 위에 오면 부모 입력 칸이 아닐 때 CAD 로 초점
- 새 시험 resources/tester/cad/ctrl-shortcut-hangul.test.ts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz
This commit is contained in:
2026-10-10 15:26:23 +09:00
co-authored by Claude Sonnet 5.5
parent b84a92cbc3
commit 7cb9860500
5 changed files with 170 additions and 10 deletions
@@ -60,6 +60,7 @@ import {
isPlainSpace,
} from './ime-sink.ts';
import { drawInputField } from './input-field-draw.ts';
import { ctrlShortcut } from './input-shortcut.ts';
import { wheelZoom } from './input-wheel.ts';
import {
ABSOLUTE_POINT_REGEXP,
@@ -339,7 +340,9 @@ export class InputController {
if (target !== this.ime.element && target?.closest('input, textarea, select')) {
return;
}
if (isImeKey(evt)) return; // 한글 조합 중 — 단축키가 먹지 않게 IME 에 넘김
const shortcut = ctrlShortcut(evt);
// 한글 조합 중 — 단축키가 먹지 않게 IME 에 넘김(Ctrl 단축키는 조합 중에도 먹음)
if (isImeKey(evt) && !shortcut) return;
console.log(`key pressed: ${evt.key}`);
if (evt.key === 'F12') {
// F12 => open developer tools
@@ -386,19 +389,16 @@ export class InputController {
}
evt.preventDefault();
evt.stopPropagation();
if (evt.ctrlKey && !evt.shiftKey && evt.key === 'z') {
if (shortcut === 'undo') {
// User wants to undo the last action
this.handleUndo(evt);
} else if (evt.ctrlKey && evt.shiftKey && evt.key === 'z') {
} else if (shortcut === 'redo') {
// User wants to redo the last action
this.handleRedo(evt);
} else if (evt.ctrlKey && evt.key === 'y') {
// User wants to redo the last action
this.handleRedo(evt);
} else if (evt.ctrlKey && evt.key === 's') {
} else if (shortcut === 'save') {
// 부모 페이지가 저장을 맡은 화면(M02 양식)만 — B07 은 예전처럼 아무 일 없음
if (isHostSave()) requestHostSave();
} else if (evt.ctrlKey && evt.key === 'a') {
} else if (shortcut === 'selectAll') {
// User wants to select everything
setSelectedEntityIds(getPickableEntities().map((entity) => entity.id));
} else if (evt.key === 'Backspace') {