pub struct KEYBOARD;
Expand description
Implementations§
source§impl KEYBOARD
impl KEYBOARD
sourcepub fn modifiers(&self) -> ReadOnlyVar<ModifiersState, ArcVar<ModifiersState>>
pub fn modifiers(&self) -> ReadOnlyVar<ModifiersState, ArcVar<ModifiersState>>
Returns a read-only variable that tracks the currently pressed modifier keys.
sourcepub fn codes(&self) -> ReadOnlyVar<Vec<KeyCode>, ArcVar<Vec<KeyCode>>>
pub fn codes(&self) -> ReadOnlyVar<Vec<KeyCode>, ArcVar<Vec<KeyCode>>>
Returns a read-only variable that tracks the KeyCode
of the keys currently pressed.
sourcepub fn keys(&self) -> ReadOnlyVar<Vec<Key>, ArcVar<Vec<Key>>>
pub fn keys(&self) -> ReadOnlyVar<Vec<Key>, ArcVar<Vec<Key>>>
Returns a read-only variable that tracks the Key
identifier of the keys currently pressed.
sourcepub fn repeat_config(
&self,
) -> ArcCowVar<KeyRepeatConfig, ArcVar<KeyRepeatConfig>>
pub fn repeat_config( &self, ) -> ArcCowVar<KeyRepeatConfig, ArcVar<KeyRepeatConfig>>
Returns a variable that defines key press repeat start delay and repeat speed on the app.
This delay is roughly the time the user must hold a key pressed to start repeating. When a second key press
happens without any other keyboard event and within twice this value it increments the repeat_count
by the KeyboardManager
.
The value is the same as sys_repeat_config
, if set the variable disconnects from system config.
sourcepub fn sys_repeat_config(
&self,
) -> ReadOnlyVar<KeyRepeatConfig, ArcVar<KeyRepeatConfig>>
pub fn sys_repeat_config( &self, ) -> ReadOnlyVar<KeyRepeatConfig, ArcVar<KeyRepeatConfig>>
Returns a read-only variable that tracks the operating system key press repeat start delay and repeat speed.
The variable updates every time the system config changes and on view-process (re)init.
sourcepub fn caret_animation_config(
&self,
) -> ArcCowVar<(Duration, Duration), ArcVar<(Duration, Duration)>>
pub fn caret_animation_config( &self, ) -> ArcCowVar<(Duration, Duration), ArcVar<(Duration, Duration)>>
Returns a variable that defines the system config for the caret blink speed and timeout for the app.
The first value defines the blink speed interval, the caret is visible for the duration, then not visible for the duration. The second value defines the animation total duration, the caret stops animating and sticks to visible after this timeout is reached.
You can use the caret_animation
method to generate a new animation.
The value is the same as sys_repeat_config
, if set the variable disconnects from system config.
sourcepub fn sys_caret_animation_config(
&self,
) -> ReadOnlyVar<(Duration, Duration), ArcVar<(Duration, Duration)>>
pub fn sys_caret_animation_config( &self, ) -> ReadOnlyVar<(Duration, Duration), ArcVar<(Duration, Duration)>>
Returns a read-only variable that tracks the operating system caret blink speed and timeout.
The variable updates every time the system config changes and on view-process (re)init.
sourcepub fn caret_animation(&self) -> ReadOnlyVar<Factor, ArcVar<Factor>>
pub fn caret_animation(&self) -> ReadOnlyVar<Factor, ArcVar<Factor>>
Returns a new read-only variable that animates the caret opacity.
A new animation must be started after each key press. The value is always 1 or 0, no easing is used by default,
it can be added using the Var::easing
method.
Auto Trait Implementations§
impl Freeze for KEYBOARD
impl RefUnwindSafe for KEYBOARD
impl Send for KEYBOARD
impl Sync for KEYBOARD
impl Unpin for KEYBOARD
impl UnwindSafe for KEYBOARD
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more