1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Input components for text editing in GPUI applications.
//!
//! This module provides the state management and keybinding infrastructure for
//! building text input components. It includes:
//!
//! - [`InputState`]: The core state model for text input, handling content,
//! selection, cursor management, and edit history.
//! - [`CursorBlink`]: Manages cursor blinking state for input components.
//! - [`InputBindings`]: Configurable keybindings for input actions.
//! - [`TextDirection`]: Bidirectional text support for RTL/LTR detection.
//!
//! # Example
//!
//! ```ignore
//! use gpui::Context;
//! use gpuikit::input::{InputState, bind_input_keys};
//!
//! // Initialize keybindings (typically in app initialization)
//! bind_input_keys(cx, None);
//!
//! // Create an input state
//! let input = cx.new(|cx| InputState::new_singleline(cx));
//! ```
/// Input keybinding configuration & actions that can be bound (`Backspace`, `Copy`, etc.).
///
/// Explicitly not exported using `pub use bindings::*` to avoid namespace pollution.
pub use ;
pub use ;
pub use CursorBlink;
pub use *;
pub use ;