pub trait AppKeyBindingsExt {
// Required method
fn add_key_binding<M>(
&mut self,
binding: KeyBinding,
on_press: impl IntoObserverSystem<KeyPressed, M>,
) -> Option<Entity>;
}Expand description
Binds keys on an App.
Required Methods§
Sourcefn add_key_binding<M>(
&mut self,
binding: KeyBinding,
on_press: impl IntoObserverSystem<KeyPressed, M>,
) -> Option<Entity>
fn add_key_binding<M>( &mut self, binding: KeyBinding, on_press: impl IntoObserverSystem<KeyPressed, M>, ) -> Option<Entity>
Spawns binding with on_press, an observer of the KeyPressed
it triggers, and returns its entity, unless another binding
conflicts with it (KeyBinding::conflicts): that one stays, with
a warning.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".