Skip to content

[fix] 블록 메뉴 Ctrl+1~9 카테고리 단축키 인덱스 보정#3074

Open
205sla wants to merge 1 commit into
entrylabs:developfrom
205sla:fix/block-menu-shortcut-index
Open

[fix] 블록 메뉴 Ctrl+1~9 카테고리 단축키 인덱스 보정#3074
205sla wants to merge 1 commit into
entrylabs:developfrom
205sla:fix/block-menu-shortcut-index

Conversation

@205sla

@205sla 205sla commented Jun 4, 2026

Copy link
Copy Markdown

블록 메뉴에서 Ctrl + 1 ~ Ctrl + 9 단축키가 보이는 블록 카테고리를 순서대로 선택하도록 인덱스 매핑 오류를 수정했습니다.

_captureKeyEvent에서 Ctrl+1-9 입력 시 키 코드(49-57)를 그대로
selectMenu에 넘겨, 숫자 selector를 0 기반 카테고리 인덱스로 해석하는
_convertSelector가 범위를 벗어나 undefined를 반환하던 문제를 수정.
keyCode - 49로 변환한 categoryIndex를 전달해 Ctrl+1→0 ... Ctrl+9→8로 보이는 카테고리를 정상 선택하도록 보정.

_captureKeyEvent에서 Ctrl+1~9 입력 시 키 코드(49~57)를 그대로
selectMenu에 넘겨, 숫자 selector를 0 기반 카테고리 인덱스로 해석하는
_convertSelector가 범위를 벗어나 undefined를 반환하던 문제를 수정.
keyCode - 49로 변환한 categoryIndex를 전달해 Ctrl+1→0 ... Ctrl+9→8로
보이는 카테고리를 정상 선택하도록 보정.
Copilot AI review requested due to automatic review settings June 4, 2026 06:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the block menu keyboard shortcut handling so Ctrl+1..9 maps to a zero-based category index before selecting the menu entry.

Changes:

  • Convert digit key keyCode (49–57) into a zero-based categoryIndex (0–8)
  • Pass categoryIndex to _dSelectMenu(...) instead of the raw keyCode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1323 to +1328
if (e.ctrlKey && Entry.type === 'workspace' && keyCode > 48 && keyCode < 58) {
const categoryIndex = keyCode - 49;
e.preventDefault();
setTimeout(() => {
this._cancelDynamic(true);
this._dSelectMenu(keyCode, true);
this._dSelectMenu(categoryIndex, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants