press_key

Function press_key 

Source
pub fn press_key(key: u8)
Expand description

Simulates pressing and releasing a keyboard key.

§Parameters

  • key: The virtual-key code of the key to press (e.g., 0x41 for ‘A’).

§Behavior

  • Presses the specified key.
  • Releases the specified key immediately after pressing.