pub struct KEYBOARD;
Expand description
Implementations§
source§impl KEYBOARD
impl KEYBOARD
sourcepub fn modifiers(&self) -> ReadOnlyArcVar<ModifiersState>
pub fn modifiers(&self) -> ReadOnlyArcVar<ModifiersState>
Returns a read-only variable that tracks the currently pressed modifier keys.
sourcepub fn codes(&self) -> ReadOnlyArcVar<Vec<KeyCode>>
pub fn codes(&self) -> ReadOnlyArcVar<Vec<KeyCode>>
Returns a read-only variable that tracks the KeyCode
of the keys currently pressed.
sourcepub fn keys(&self) -> ReadOnlyArcVar<Vec<Key>>
pub fn keys(&self) -> ReadOnlyArcVar<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) -> ReadOnlyArcVar<KeyRepeatConfig>
pub fn sys_repeat_config(&self) -> ReadOnlyArcVar<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) -> ReadOnlyArcVar<(Duration, Duration)>
pub fn sys_caret_animation_config(&self) -> ReadOnlyArcVar<(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) -> ReadOnlyArcVar<Factor>
pub fn caret_animation(&self) -> ReadOnlyArcVar<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> 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> 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