#[repr(C, packed(1))]pub struct BootKeyboardReport {
pub modifiers: u8,
pub reserved: u8,
pub keys: [u8; 6],
}Expand description
Boot keyboard report: 8 bytes
Byte 0: Modifier keys bitmask bit 0: Left Ctrl, bit 1: Left Shift, bit 2: Left Alt, bit 3: Left GUI bit 4: Right Ctrl, bit 5: Right Shift, bit 6: Right Alt, bit 7: Right GUI Byte 1: Reserved (OEM use) Bytes 2-7: Up to 6 simultaneous key codes (0 = no key)
Fields§
§modifiers: u8§reserved: u8§keys: [u8; 6]Implementations§
Source§impl BootKeyboardReport
impl BootKeyboardReport
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self, KernelError>
pub fn from_bytes(data: &[u8]) -> Result<Self, KernelError>
Parse a raw 8-byte buffer into a keyboard report
Sourcepub fn has_modifier(&self, bit: u8) -> bool
pub fn has_modifier(&self, bit: u8) -> bool
Check if a modifier bit is set
Sourcepub fn left_shift(&self) -> bool
pub fn left_shift(&self) -> bool
Check for Left Shift
Trait Implementations§
Source§impl Clone for BootKeyboardReport
impl Clone for BootKeyboardReport
Source§fn clone(&self) -> BootKeyboardReport
fn clone(&self) -> BootKeyboardReport
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BootKeyboardReport
impl Debug for BootKeyboardReport
impl Copy for BootKeyboardReport
Auto Trait Implementations§
impl Freeze for BootKeyboardReport
impl RefUnwindSafe for BootKeyboardReport
impl Send for BootKeyboardReport
impl Sync for BootKeyboardReport
impl Unpin for BootKeyboardReport
impl UnwindSafe for BootKeyboardReport
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)