Struct HIDKeyboardReporter
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§
§impl HIDKeyboardReporter
impl HIDKeyboardReporter
pub const fn new() -> HIDKeyboardReporter
pub const fn new() -> HIDKeyboardReporter
Constructs a new HIDKeyboardReporter.
pub fn init(&mut self)
pub fn init(&mut self)
Transforms the keymap output to a HID keyboard report.
pub fn update(
&mut self,
pressed_key_outputs: Vec<KeyOutput, smart_keymap_core::::keymap::hid_keyboard_reporter::{impl#1}::update::{constant#0}>,
)
pub fn update( &mut self, pressed_key_outputs: Vec<KeyOutput, smart_keymap_core::::keymap::hid_keyboard_reporter::{impl#1}::update::{constant#0}>, )
Updates the state of the HIDKeyboardReporter with the given pressed key outputs.
pub 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.
pub fn reportable_key_outputs(
&self,
) -> Vec<KeyOutput, smart_keymap_core::::keymap::hid_keyboard_reporter::{impl#1}::reportable_key_outputs::{constant#0}>
pub fn reportable_key_outputs( &self, ) -> Vec<KeyOutput, smart_keymap_core::::keymap::hid_keyboard_reporter::{impl#1}::reportable_key_outputs::{constant#0}>
Gets the filtered pressed key outputs, suitable for sending for HID reports.
Trait Implementations§
§impl Debug for HIDKeyboardReporter
impl Debug for HIDKeyboardReporter
§impl Default for HIDKeyboardReporter
impl Default for HIDKeyboardReporter
§fn default() -> HIDKeyboardReporter
fn default() -> HIDKeyboardReporter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HIDKeyboardReporter
impl RefUnwindSafe for HIDKeyboardReporter
impl Send for HIDKeyboardReporter
impl Sync for HIDKeyboardReporter
impl Unpin for HIDKeyboardReporter
impl UnsafeUnpin 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