GeezerVison is showing github.com — feat(id-native-shell): send key presses to the foreground world (#15022) by dezren39 · Pull Request #15464 · developing-today/code
Conversation
dezren39
commented
Nov 26, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Before: the native shell drew a world's view but ignored the keyboard. The outbound channel to the session existed and was never used, so a world could be seen but not played.
After: key presses in the window reach the world as the same input frames the terminal shell sends. In directory mode they go only to the foreground world, and Esc stays the way back to the list. In direct-join mode (--world), every key goes to the one session.
This is the session-mode input slice of #15022 (design #5782 §3), following #15461.
How:
events.rs: new key_input_bytes(key, text, modifiers) maps a key to xterm bytes.
- Characters use the platform text, which carries Shift and dead keys.
- Covers Enter, Tab, Backspace, Esc, arrows, Home/End, Insert/Delete and PageUp/PageDown.
- F1 to F12 use xterm's sequences.
- Ctrl chords become control bytes, and Alt adds an ESC prefix.
- Keys with no encoding send nothing.
directory.rs:
DirectoryApp::session_input_target picks the foreground world in session focus, and nothing for Esc or in directory focus.
- New
DirectoryInputSystems set.
main.rs:
- The forwarding systems read
KeyboardInput messages and try_send the frame. A full queue drops the key with a stderr note; it never blocks a frame.
- Directory-mode forwarding runs before the directory's key handling, so the Enter that opens a world and the Esc that leaves one are never sent to it.
- Tests cover characters with text and fallback, every named-key sequence, Ctrl and Alt, keys with no encoding, parity with
input_frame, and the input-target rule.
- Not in this slice: clipboard paste and window resize, which need a clipboard backend and font cell metrics.
Verified with the remote org-run dispatch (test-native-shell and clippy-native-shell).
Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Key presses in the native window now reach the session as the
terminal's own input frames: characters (with Shift and dead keys
from the platform text), Enter, Tab, Backspace, arrows, Home/End,
Insert/Delete, PageUp/PageDown, F1-F12, Ctrl chords as control bytes
and Alt as an ESC prefix, in xterm's encoding. In directory mode keys
go only to the foreground world and Esc stays the way back to the
list; forwarding runs before the directory's key handling, so the
key that opens or leaves a world is never sent to it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
coderabbitai
Bot
commented
Nov 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 17 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3c4849b0-9a75-4f6a-9c77-e4478ea0852f
Commits
-
Reviewing files that changed from the base of the PR and between fdd18ae and 0289fd6.
Files selected for processing: 3
-
pkgs/id/crates/id-native-shell/src/directory.rs
pkgs/id/crates/id-native-shell/src/events.rs
pkgs/id/crates/id-native-shell/src/main.rs
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|