Skip to content

[keydown과 keyup 이벤트] 번역#1901

Open
Violet-Bora-Lee wants to merge 3 commits into
masterfrom
translate-keyboard-events
Open

[keydown과 keyup 이벤트] 번역#1901
Violet-Bora-Lee wants to merge 3 commits into
masterfrom
translate-keyboard-events

Conversation

@Violet-Bora-Lee

Copy link
Copy Markdown
Member

Part 2. 3.7 Keyboard: keydown and keyup 챕터 번역입니다.

본문(article.md)과 연관 파일(실험용 미니 데모 keyboard-dump.view, 과제 2-check-sync-keydown의 task·solution·데모)을 함께 번역했습니다.

번역 관련 판단

  • 제목·헤딩: 'Keyboard: keydown and keyup' → 'keydown과 keyup 이벤트', 'Teststand' → '실험용 미니 데모'
  • keyboard layout → '자판 배열'(미국식·독일식)로 통일
  • UI 문자열 현지화: alert('실행 취소!'), placeholder '전화번호를 입력해 주세요', 데모 버튼 '지우기' 등(본문 참조와 일치)
  • 옮긴이 주 신설: 한글 IME는 여러 키를 조합해 글자를 만들기 때문에 keydown 기본 동작을 막아도 입력된다는 한국어 독자 특화 사실을 전화번호 필터 예제에 보강
  • 줄 수·헤딩·코드블록·링크 구조는 원문과 동일하게 유지(189줄 = 189줄)

체크리스트

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ezn3Dq7aWbVPvWonrUn8YK

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

Part 2 > 3.7 “Keyboard: keydown and keyup” 챕터 및 연관 데모/과제 페이지를 한국어로 번역해, ko.javascript.info 학습 콘텐츠의 현지화 범위를 확장하는 PR입니다.

Changes:

  • 본문 article.md 전체 번역(제목/헤딩/설명/예시 문구 및 일부 UI 문자열 현지화 포함)
  • 실험용 미니 데모(keyboard-dump.view) UI 문구 현지화
  • 과제(2-check-sync-keydown) task/solution/데모 문구 현지화

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
2-ui/3-event-details/7-keyboard-events/keyboard-dump.view/index.html 실험용 미니 데모 UI 문자열 한국어로 현지화
2-ui/3-event-details/7-keyboard-events/article.md 챕터 본문 전체 번역 및 예시 문구 현지화
2-ui/3-event-details/7-keyboard-events/2-check-sync-keydown/task.md 과제 설명 번역 및 예시 문구 현지화
2-ui/3-event-details/7-keyboard-events/2-check-sync-keydown/solution.view/index.html 과제 해설 데모 페이지 문구/주석 번역
2-ui/3-event-details/7-keyboard-events/2-check-sync-keydown/solution.md 과제 해설 본문 번역

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

정말 이상하게 들리지만 실제로 그렇습니다. [명세](https://www.w3.org/TR/uievents-code/#table-key-code-alphanumeric-writing-system)에 이런 동작이 명시되어 있습니다.

So, `event.code` may match a wrong character for unexpected layout. Same letters in different layouts may map to different physical keys, leading to different codes. Luckily, that happens only with several codes, e.g. `keyA`, `keyQ`, `keyZ` (as we've seen), and doesn't happen with special keys such as `Shift`. You can find the list in the [specification](https://www.w3.org/TR/uievents-code/#table-key-code-alphanumeric-writing-system).
이렇게 `event.code`는 예상치 못한 자판 배열에서 엉뚱한 글자와 연결될 수 있습니다. 배열이 다르면 같은 글자가 서로 다른 물리 키에 자리해 코드도 달라지기 때문입니다. 다행히 이런 일은 앞서 본 `keyA`·`keyQ`·`keyZ` 등 몇몇 코드에서만 일어나고 `Shift` 같은 특수 키에선 일어나지 않습니다. 해당 목록은 [명세](https://www.w3.org/TR/uievents-code/#table-key-code-alphanumeric-writing-system)에서 확인할 수 있습니다.
`code1`, `code2`, ..., `code_n` 코드에 해당하는 키를 동시에 누르면 `func`를 실행하는 함수 `runOnKeys(func, code1, code2, ... code_n)`를 만들어 보세요.

For instance, the code below shows `alert` when `"Q"` and `"W"` are pressed together (in any language, with or without CapsLock)
예를 들어 아래 코드는 `"Q"``"W"`를 동시에 누르면 `alert` 창을 띄웁니다(언어 설정과 CapsLock 여부와 관계없이 동작합니다)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants