device_uhid_key_press
Send a key press/release via UHID keyboard (id=2). Uses the device control protocol's boot keyboard interface. On first call, CREATE is sent automatically. modifiers bitmask: bit0=LCtrl, bit1=LShift, bit2=LAlt, bit3=LMeta, bit4=RCtrl, bit5=RShift, bit6=RAlt, bit7=RMeta. keycode is the HID usage ID (0x04=a, 0x28=Enter, 0x29=Escape). Send keycode=0 with modifiers=0 to release. device_key is the higher-level twin: it accepts named keys (HOME, ENTER, ...) instead of raw usage IDs and falls back automatically when a key needs policy-level handling. Prefer device_key for normal automation; reach for this one only when injected key events are filtered.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Device serial number (UDID) | |
| keycode | No | HID usage key code (default 0 = no key) | |
| modifiers | No | Modifier bitmask (default 0) |