pub struct InputPlugin;Expand description
Input Plugin - registers Input and processes input events
This plugin:
- Creates and registers
Inputin Context with default bindings - Subscribes to keyboard and mouse events from the window
- Syncs input state at frame boundaries
Required for using ctx.input().
§Event Handling
Listens to these events from kon_window:
KeyboardInput: Key press/releaseMouseButtonInput: Mouse button press/releaseMousePosition: Cursor position updatesMouseMotion: Raw mouse movement deltaMouseWheel: Scroll wheel movement
Trait Implementations§
Source§impl Plugin for InputPlugin
impl Plugin for InputPlugin
Source§fn is_plugin_group(&self) -> bool
fn is_plugin_group(&self) -> bool
Returns true if this is a plugin bundle that adds other plugins internally.
Used for accurate plugin count logging (e.g., DefaultPlugins).
Auto Trait Implementations§
impl Freeze for InputPlugin
impl RefUnwindSafe for InputPlugin
impl Send for InputPlugin
impl Sync for InputPlugin
impl Unpin for InputPlugin
impl UnwindSafe for InputPlugin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.