Skip to main content

inject_hid_scancode

Function inject_hid_scancode 

Source
pub fn inject_hid_scancode(scancode: u8, pressed: bool)
Expand description

Inject a PS/2 scancode from USB HID or other non-PS/2 source.

Must be called from task context. Converts scancode to character via the current layout and pushes to the buffer if applicable. Used by hid::poll_all() when USB HID reports arrive.

  • scancode: PS/2 Set 1 scancode (0x00-0x7F for press, or 0x80|code for release)
  • pressed: true = key press, false = key release