pub struct KeyData {
pub key: Key,
pub key_state: KeyState,
}Expand description
height-level key data wrapper
Fields§
§key: Key§key_state: KeyStateImplementations§
Source§impl KeyData
impl KeyData
Sourcepub fn supports_modifiers(&self) -> bool
pub fn supports_modifiers(&self) -> bool
check if the modifier key is supported.
check if the menu is pressed.
Sourcepub fn supports_toggles(&self) -> bool
pub fn supports_toggles(&self) -> bool
check if the toggle state is supported.
Sourcepub fn is_realtime_mode(&self) -> bool
pub fn is_realtime_mode(&self) -> bool
check if realtime mode is active. but inconsistent keyboard input behavior across different vendors :(
Sourcepub fn scroll_lock(&self) -> bool
pub fn scroll_lock(&self) -> bool
check if the scroll lock is active.
Sourcepub fn realtime_init(stdin: &mut ScopedProtocol<Input>, enable: bool) -> Result
pub fn realtime_init(stdin: &mut ScopedProtocol<Input>, enable: bool) -> Result
initialize realtime mode. warn: this init function could overwrite the existing toggle state. warn: it is recommended to call this function at program startup.
Trait Implementations§
Source§impl From<KeyData> for RawKeyData
reverse conversion to C struct
impl From<KeyData> for RawKeyData
reverse conversion to C struct
Source§impl From<RawKeyData> for KeyData
forward conversion to Rust struct
impl From<RawKeyData> for KeyData
forward conversion to Rust struct
Source§fn from(raw: RawKeyData) -> Self
fn from(raw: RawKeyData) -> Self
Converts to this type from the input type.
impl Copy for KeyData
Auto Trait Implementations§
impl Freeze for KeyData
impl RefUnwindSafe for KeyData
impl Send for KeyData
impl Sync for KeyData
impl Unpin for KeyData
impl UnwindSafe for KeyData
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
Mutably borrows from an owned value. Read more