Skip to main content

euv_engine/input/
type.rs

1use super::*;
2
3/// A set of keyboard key code strings currently in a given state.
4pub type KeyStateSet = HashSet<String>;
5
6/// A map from touch identifier to touch position.
7pub type TouchPointMap = HashMap<i32, Vector2D>;
8
9/// A shared, single-threaded cell holding the engine's [`InputState`].
10///
11/// Registered DOM event listeners clone this `Rc` to keep the state alive
12/// for the lifetime of the document, while game code reads the same cell
13/// through `EngineHandle::try_get_input_cell`.
14pub type InputStateCell = Rc<EngineCell<InputState>>;