logo
pub trait KeyboardSystem {
    fn is_supported(&self) -> bool;
    fn down_signal(&self) -> &Signal1<KeyboardEvent>;
    fn up_signal(&self) -> &Signal1<KeyboardEvent>;
    fn back_button(&self) -> &Signal0;
    fn is_down(&self, key: Key) -> bool;
}
Expand description

Functions related to the environment’s physical keyboard.

Required Methods

Whether the environment has a physical keyboard. Phones and tablets will generally return false here.

Emitted when a key is pressed down.

Emitted when a key is released.

Emitted when a hardware back button is pressed. If no listeners are connected to this signal when the back button is pressed, the platform’s default action will be taken (which is usually to close the app). Only supported on Android.

@returns True if the given key is currently being held down.

Implementors