Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Native SWT keyboard behavior needs Windows/Linux and AltGr-layout validation because helper tests do not cover Shift+Tab traversal or characters delivered for Ctrl+Alt chords.
No open issues 🎉
What changed in this PR
Aligns Eclipse Terminal’s keyboard handling with xterm so terminal applications receive expected key sequences while preserving AltGr input and shell-prompt shortcuts.
Changes:
- Adds Shift+Tab handling, modified Delete sequences, Ctrl+digit mappings, and ESC prefixes for control-character Ctrl+Alt combinations.
- Routes modified arrows to terminal applications on the alternate screen, even when Eclipse has matching bindings.
- Adds tests for character mappings, AltGr handling, modified Delete, and alternate-screen state.
| File | Description |
|---|---|
| terminal/tests/org.eclipse.terminal.test/src/org/eclipse/terminal/internal/emulator/VT100EmulatorTest.java | Tests key mappings, Alt handling, and alternate-screen reporting. |
| terminal/bundles/org.eclipse.terminal.control/src/org/eclipse/terminal/internal/emulator/VT100TerminalControl.java | Updates key encoding, Shift+Tab focus handling, and alternate-screen arrow routing. |
| terminal/bundles/org.eclipse.terminal.control/src/org/eclipse/terminal/internal/emulator/VT100Emulator.java | Exposes alternate-screen state and makes it visible across threads. |
Review effort: Balanced
a3aa7ef to
b765599
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Native SWT runtime validation is still needed for Shift+Tab focus traversal and Ctrl+Alt versus AltGr handling across supported platforms, since the added tests cover helpers and emulator state rather than native event delivery.
No open issues 🎉
Review effort: Balanced
…rm does Keys that Claude Code, Codex and other terminal programs use, checked key by key against xterm: - Shift+Tab sends back tab (CSI Z), as xterm and Windows Terminal do, and no longer moves the focus out of the terminal; Claude Code switches modes with it. - Ctrl, Shift and Alt with Delete carry the modifier (CSI 3 ; 5 ~ and so on); every Delete used to arrive as a plain Delete. - A real Ctrl+Alt on a letter keeps its Alt: ESC before the control character, as in xterm (Ctrl+Alt+V pastes an image in Codex on WSL). AltGr, which SWT reports as Ctrl+Alt with the character it types, types that character as before, and Backspace, Enter, Tab and Esc with AltGr still held send what they did. Ctrl+Alt with a digit or Space is left as it was, since on Windows it cannot be told from AltGr: xterm's ESC with the control character would turn AltGr+Space into ESC NUL. - Ctrl+2 to Ctrl+8 send NUL, ESC, FS, GS, RS, US and DEL; on Windows they sent the digits. - On the alternate screen Alt and Ctrl with the arrows go to the full screen program even where Eclipse has a binding for them (Alt+Up edits a queued message in Codex); at the shell prompt Alt+Up still maximizes the view.
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
Keys that Claude Code, Codex and other terminal programs use, checked key by key against xterm:
How to test, in a bash terminal: run
od -c, press the key, then Enter, and Ctrl+D to end.Tests: new cases in VT100EmulatorTest for Ctrl with the digits, Alt with ESC (AltGr included), Delete with modifiers and the alternate screen flag.