Interaction · Keys, scroll and focus: roving focus, scroll sync, type-ahead

RovingFocus keeps a row or column of items behind one Tab stop: the
arrows walk focus, Home and End reach the ends, Enter or Space presses,
and a press moves the stop without taking focus. ScrollSync keeps boxes
at one place along an axis: the pane a wheel turned leads, and a canvas
ahead of the panes copies its place before they draw. SelectableList
moves its cursor to the row that starts with the letters typed, the
letters joining within a pause and a Command letter left to the app.
forms::History becomes public as the undo manager. The gallery shows
gpui's own key bindings, a two-stroke chord waiting on its first
stroke, uniform_list, autofocus and the focus ring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-09-27 16:10:32 -04:00
1 parent ec4c15b539
commit 9e3e6c109d
18 files changed
+925 -29

No files matched your search

+2 -2
View File
@@ -112,9 +112,9 @@ pub use structure::{
pub use switch::Switch;
pub use tags::TagInput;
pub(crate) use text::{
Backspace, Down, Enter, History, Redo, Submit, Undo, Up, bind_keys, from_utf16, to_utf16,
Backspace, Down, Enter, Redo, Submit, Undo, Up, bind_keys, from_utf16, to_utf16,
};
pub use text::{Highlight, InputEvent, TextInput};
pub use text::{Highlight, History, InputEvent, TextInput};
pub use transfer::TransferList;
pub use unit::UnitInput;
pub use upload::{Upload, UploadList, UploadState};
+1 -1
View File
@@ -94,7 +94,7 @@ pub(crate) struct Snapshot {
const JOIN: Duration = Duration::from_millis(900);
/// Undo and redo as whole snapshots of what an editor holds.
pub(crate) struct History<S> {
pub struct History<S> {
undo: Vec<S>,
redo: Vec<S>,
typing_since: Option<Instant>,
+2 -1
View File
@@ -13,8 +13,9 @@ use gpui::{
};
pub(crate) use actions::{Backspace, Down, Enter, Redo, Submit, Undo, Up, bind_keys};
pub use edit::History;
use edit::Snapshot;
pub(crate) use edit::{History, from_utf16, to_utf16};
pub(crate) use edit::{from_utf16, to_utf16};
pub use highlight::Highlight;
use crate::theme::ActiveTheme;