! Press a physical key (key.press)
The hardware keyboard behavior described on this page is available in versions after 20260805
Declaration
key.press(keycode)
Parameters
- keycode
String. Physical key code. See Samples and supported key codes.
Description
Simulate pressing and then releasing a physical key.
- After a global hardware keyboard is connected, standard keyboard and keypad keys use that object. Media and vendor-defined keys keep their previous behavior
- Calls through
key(...):press()follow the same rules - With a global hardware keyboard, the key is held for 10 milliseconds by default and the wait may yield. Without one, behavior remains unchanged
- Failed input is not retried through the previous input method