Expand description
Action-based input system with mode-sensitive key/mouse bindings. Input system: action-based input mapping with mode-sensitive bindings.
Decouples semantic actions (Orbit, Pan, Zoom, …) from physical triggers (key/mouse combinations), enabling future key reconfiguration and context-sensitive controls (Normal / FlyMode / Manipulating).
§New input pipeline (recommended)
The new pipeline provides a higher-level, framework-agnostic path:
- Translate native events to [
ViewportEvent] - Feed into [
OrbitCameraController] (or lower-level [ViewportInput]) - Call [
OrbitCameraController::apply_to_camera] each frame
§Legacy input system (compatibility)
The older [InputSystem] / [FrameInput] query model remains available.
Re-exports§
pub use action::Action;pub use binding::ActivationMode;pub use binding::Binding;pub use binding::KeyCode;pub use binding::Modifiers;pub use binding::MouseButton;pub use binding::Trigger;pub use binding::TriggerKind;pub use defaults::default_bindings;pub use mode::InputMode;pub use query::ActionState;pub use query::FrameInput;pub use action_frame::ActionFrame;pub use action_frame::ResolvedActionState;pub use context::ViewportContext;pub use controller::OrbitCameraController;pub use event::ButtonState;pub use event::ScrollUnits;pub use event::ViewportEvent;pub use preset::BindingPreset;pub use preset::viewport_all_bindings;pub use viewport_binding::ModifiersMatch;pub use viewport_binding::ViewportBinding;pub use viewport_binding::ViewportGesture;pub use viewport_input::ViewportInput;
Modules§
- action
- Semantic action enum. Semantic action identifiers for the viewport input system.
- action_
frame - Per-frame resolved action output. Per-frame resolved action output for the new input pipeline.
- binding
- Binding, trigger, and modifier types. Input binding types: triggers, modifiers, and bindings that map actions to physical inputs.
- context
- Per-frame viewport context. Per-frame viewport context for the new input pipeline.
- controller
- High-level orbit/pan/zoom camera controller. High-level orbit/pan/zoom camera controller.
- defaults
- Default key/mouse bindings for the viewport.
- event
- Framework-agnostic viewport events. Framework-agnostic viewport events for the new input pipeline.
- mode
- Input mode enum (Normal, FlyMode, Manipulating).
- preset
- Named control presets. Named control presets for the viewport input pipeline.
- query
- Per-frame input snapshot and action-state query evaluation.
- viewport_
binding - Viewport gesture and binding types. Viewport gesture and binding types for the new input pipeline.
- viewport_
input - Stateful viewport input accumulator and resolver. Stateful viewport input accumulator and resolver.
Structs§
- Input
System - Central input system that evaluates action queries against the current binding table and input mode.