feat(B07-CAD): Space = Enter(오토캐드) · 빈 Enter · Space = 마지막 명령 반복(97-3)

- 캔버스 · 명령줄에서 Space(수정키 없음 · 길게 눌러 반복 아님) = Enter · 글 단계(TEXT · MTEXT · 표 칸 · 이름 등)는 띄어쓰기
- 글 단계 판정 = sequence-tool 단계 meta kind 'text'(activeToolWantsFreeText)
- 빈 입력 + 선택 도구 대기에서 키보드 Enter · Space = repeatLastCommand · 빈 우클릭은 확정만
- 한글 조합 중 Space · Shift/Ctrl+Space 무시
- 시험 ime-sink: 「L␣」 = LINE · TEXT 띄어쓰기 · 조합 중 · 수정키 · 반복 무시 · 빈 Space · Enter 반복 · 우클릭 반복 안 함

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KYZ2HWWdUwZWYnn3tQz7X
This commit is contained in:
2026-10-08 14:02:30 +09:00
co-authored by Claude Opus 5.5
parent e020cf71aa
commit 456c11aa5d
5 changed files with 136 additions and 7 deletions
@@ -2,6 +2,7 @@
import { type FC, type FormEvent, useMemo, useRef, useState } from 'react';
import { describeCommand, matchCommandPrefixes } from '../commands/registry';
import { getCommandHistory, runCommandInput } from '../commands/run-command';
import { activeToolWantsFreeText, isPlainSpace } from '../inputController/ime-sink';
import { getInputController, getLastStateInstructions } from '../state';
export const CommandLine: FC = () => {
@@ -18,7 +19,7 @@ export const CommandLine: FC = () => {
const value = text.trim();
if (!value) {
// 빈 ENTER는 활성 명령의 확정 신호다 (선택 끝내기·직전 명령 반복)
getInputController().handleEnterKey();
getInputController().handleEnterKey(true);
return;
}
// 진행 중인 명령이 문자·숫자를 기다리면 그쪽으로, 아니면 명령으로 해석된다
@@ -54,6 +55,14 @@ export const CommandLine: FC = () => {
onChange={(event) => setText(event.target.value)}
onKeyDown={(event) => {
if (event.nativeEvent.isComposing) return; // 한글 조합 중 키는 IME 몫
if (event.key === ' ' && !activeToolWantsFreeText()) {
// Space = Enter(오토캐드) · 글 단계는 띄어쓰기 · 수정키 Space 는 그대로(입력칸 몫)
if (isPlainSpace(event)) {
event.preventDefault();
event.currentTarget.form?.requestSubmit();
} else if (event.repeat) event.preventDefault();
return;
}
if (event.key === 'Escape') {
event.preventDefault();
getInputController().handleEscapeKey();