[fix] 블록 메뉴 Ctrl+1~9 카테고리 단축키 인덱스 보정#3074
Open
205sla wants to merge 1 commit into
Open
Conversation
_captureKeyEvent에서 Ctrl+1~9 입력 시 키 코드(49~57)를 그대로 selectMenu에 넘겨, 숫자 selector를 0 기반 카테고리 인덱스로 해석하는 _convertSelector가 범위를 벗어나 undefined를 반환하던 문제를 수정. keyCode - 49로 변환한 categoryIndex를 전달해 Ctrl+1→0 ... Ctrl+9→8로 보이는 카테고리를 정상 선택하도록 보정.
There was a problem hiding this comment.
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-basedcategoryIndex(0–8) - Pass
categoryIndexto_dSelectMenu(...)instead of the rawkeyCode
💡 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
블록 메뉴에서 Ctrl + 1 ~ Ctrl + 9 단축키가 보이는 블록 카테고리를 순서대로 선택하도록 인덱스 매핑 오류를 수정했습니다.
_captureKeyEvent에서 Ctrl+1-9 입력 시 키 코드(49-57)를 그대로
selectMenu에 넘겨, 숫자 selector를 0 기반 카테고리 인덱스로 해석하는
_convertSelector가 범위를 벗어나 undefined를 반환하던 문제를 수정.
keyCode - 49로 변환한 categoryIndex를 전달해 Ctrl+1→0 ... Ctrl+9→8로 보이는 카테고리를 정상 선택하도록 보정.