redraw/event/keyboard
KeyboardEvent
objects describe a user interaction with the keyboard; each
event describes a single interaction between the user and a key (or
combination of a key with modifier keys) on the keyboard. The event type
(keydown
,
keypress
,
or keyup
)
identifies what kind of keyboard activity occurred.
Types
pub type KeyboardEvent
Functions
pub fn char_code(event: KeyboardEvent) -> Int
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Do not use this property, as it is deprecated. Instead, get the Unicode value of the character using the key property.
pub fn get_modifier_state(
event: KeyboardEvent,
key: String,
) -> Bool
pub fn key_code(event: KeyboardEvent) -> Int
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes.
pub fn which(event: KeyboardEvent) -> Int
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes.