pub struct HIDKeyboardReporter { /* private fields */ }
Expand description
Transforms output from the keymap so it’s suitable for HID keyboard reports.
e.g. limits output to one new pressed key per sent report, so that the USB host doesn’t confuse the sequence of pressed keys.
Implementations§
Source§impl HIDKeyboardReporter
impl HIDKeyboardReporter
Sourcepub fn update(
&mut self,
pressed_key_outputs: Vec<KeyOutput, { MAX_PRESSED_KEYS }>,
)
pub fn update( &mut self, pressed_key_outputs: Vec<KeyOutput, { MAX_PRESSED_KEYS }>, )
Updates the state of the HIDKeyboardReporter with the given pressed key outputs.
Sourcepub fn report_sent(&mut self)
pub fn report_sent(&mut self)
Indicate an HID report was sent. Allows reporting one more key in the next report.
Sourcepub fn reportable_key_outputs(&self) -> Vec<KeyOutput, { MAX_PRESSED_KEYS }>
pub fn reportable_key_outputs(&self) -> Vec<KeyOutput, { MAX_PRESSED_KEYS }>
Gets the filtered pressed key outputs, suitable for sending for HID reports.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HIDKeyboardReporter
impl RefUnwindSafe for HIDKeyboardReporter
impl Send for HIDKeyboardReporter
impl Sync for HIDKeyboardReporter
impl Unpin for HIDKeyboardReporter
impl UnwindSafe for HIDKeyboardReporter
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