From bd4df8d0002602ee14caa148d7d242de6ff2422f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 28 Nov 2026 09:16:04 +0100 Subject: [PATCH] input docs: no backend names in core --- crates/thing-core/src/input/event.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/thing-core/src/input/event.rs b/crates/thing-core/src/input/event.rs index a76924d..7f9f6da 100644 --- a/crates/thing-core/src/input/event.rs +++ b/crates/thing-core/src/input/event.rs @@ -7,19 +7,19 @@ /// One thing the user did, in the order the host saw it. #[derive(Clone, Debug, PartialEq)] pub enum InputEvent { - /// A key press or auto-repeat (`repeat: true`). A release never enters: crossterm reports - /// Release on Windows and the TUI drops it, and the web host drops keyup. `Char` is the + /// A key press or auto-repeat (`repeat: true`). A release never enters: a terminal + /// reports Release on Windows and the TUI drops it, and the web host drops keyup. `Char` is the /// character the keyboard layout produced (Shift+a is `Char('A')` with `shift` set; /// Shift+Tab is `Tab` with `shift`). A typing key emits `Key` then `Text`, in that order (DOM - /// keydown precedes beforeinput; winit's KeyEvent carries text beside the key; egui emits + /// keydown precedes beforeinput; a window system's key event carries text beside the key; egui emits /// Event::Key then Event::Text); a Ctrl or Alt chord emits `Key` only. Commands bind to `Key`. Key { key: Key, modifiers: Modifiers, repeat: bool }, /// Committed text to insert; a paste is `Text`. Text inserts only from `Text`, so nothing /// inserts twice. Text(String), /// The IME preedit, replacing any earlier one; empty `text` ends it without commit, and the - /// commit arrives as `Text` (winit Ime::Preedit/Commit; DOM compositionupdate/compositionend). - /// `cursor` is UTF-8 byte offsets into `text`, winit's convention; the web host converts the + /// commit arrives as `Text` (DOM compositionupdate/compositionend; a window system's IME preedit and commit). + /// `cursor` is UTF-8 byte offsets into `text`, the window-system convention; the web host converts the /// DOM's UTF-16 offsets. Compose { text: String, cursor: Option<(u32, u32)> }, /// `at` is in the space `Placed` is in: logical px, or cells where a terminal cell @@ -33,8 +33,8 @@ pub enum InputEvent { /// an up outside the canvas still arrives): a pending press is dropped and no up follows. PointerCancel, /// `delta` positive y moves content toward its end (the scroll offset grows), positive x - /// right: the DOM WheelEvent sign. crossterm ScrollDown is `(0, 1)` `Lines`; winit's - /// LineDelta has the opposite sign and a winit host negates it. `Units` are logical px or + /// right: the DOM WheelEvent sign. a terminal's ScrollDown is `(0, 1)` `Lines`; a + /// window system whose line delta has the opposite sign is negated by its host. `Units` are logical px or /// cells; `Lines` are converted by core. Wheel { at: (f32, f32), delta: (f32, f32), unit: WheelUnit, modifiers: Modifiers }, /// The host window or terminal gained (`true`) or lost focus.