Skip to content

fix: solve #3365 — terminal Ctrl chords fail under non-Latin IME#3366

Closed
github-actions[bot] wants to merge 1 commit into
mainfrom
triage/issue-3365-24298771112
Closed

fix: solve #3365 — terminal Ctrl chords fail under non-Latin IME#3366
github-actions[bot] wants to merge 1 commit into
mainfrom
triage/issue-3365-24298771112

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 12, 2026

Summary

Terminal-reserved Ctrl chords (Ctrl+C, Ctrl+D, Ctrl+Z, etc.) stopped working when a non-Latin IME (e.g. Korean 2-Set) was active in Superset Desktop.

Root cause

isTerminalReservedEvent() in apps/desktop/src/renderer/hotkeys/utils/utils.ts checked event.key to identify reserved chords. Under non-Latin IME, event.key reflects the composed character (e.g. for the D key in Korean), so ctrl+ㅇ never matched the reserved set. Combined with the blanket Ctrl/Cmd interception from #3337, the chord was swallowed entirely.

Fix

  • Use event.code (physical key, IME-independent) instead of event.key, matching the approach already used by the sibling resolveHotkeyFromEvent() function.
  • Update the TERMINAL_RESERVED set to use code-derived values (ctrl+backslash instead of ctrl+\).

Test plan

  • Added utils.test.ts with 12 tests covering:
    • All 6 reserved chords with Latin input
    • 3 Korean IME scenarios (Ctrl+C/D/Z with Hangul event.key)
    • Non-reserved chord rejection (Ctrl+A)
    • Modifier combination rejection (Ctrl+Meta+C, plain C)
  • Verified Korean IME tests fail with the old event.key code and pass with the fix.

Closes #3365


Summary by cubic

Fixes terminal Ctrl chords (Ctrl+C, Ctrl+D, Ctrl+Z, etc.) failing when a non‑Latin IME is active in Superset Desktop. Uses physical key codes to recognize reserved chords regardless of IME so they reach the terminal and closes #3365.

  • Bug Fixes
    • Use event.code (not event.key) in isTerminalReservedEvent
    • Normalize reserved set to code names (e.g., ctrl+backslash)
    • Add 12 tests for Latin and Korean IME cases, plus non‑reserved/modifier rejections

Written for commit 85ceb8f. Summary will update on new commits.

Terminal-reserved Ctrl chords (Ctrl+C/D/Z…) failed under non-Latin IME
because isTerminalReservedEvent() checked event.key, which reflects
IME composition (e.g. Korean ㅇ for D). Switch to event.code which
reports the physical key regardless of IME state, matching the approach
already used by resolveHotkeyFromEvent().

Closes #3365
@eungkyu
Copy link
Copy Markdown

eungkyu commented Apr 13, 2026

This is now superseded by #3391, which rewrites isTerminalReservedEvent with the same event.code approach as part of a broader hotkey unification (shared eventToChord/matchesChord helpers, migration sanitizer, terminal override respect, etc.). The fix here is now redundant — feel free to close this PR.

@Kitenite
Copy link
Copy Markdown
Collaborator

Kitenite commented May 6, 2026

Closing as stale: the referenced issue is already closed (fix landed elsewhere or won't-fix). Bulk audit 2026-05-06.

@Kitenite Kitenite closed this May 6, 2026
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.

[bug] Terminal-reserved Ctrl chords (Ctrl+C/D/Z…) fail under non-Latin IME (e.g. Korean)

2 participants