(
button: string,
phase: "down" | "up",
usagePage?: number,
usage?: number,
)
| 2589 | } |
| 2590 | |
| 2591 | function sendHardwareButtonEvent( |
| 2592 | button: string, |
| 2593 | phase: "down" | "up", |
| 2594 | usagePage?: number, |
| 2595 | usage?: number, |
| 2596 | ) { |
| 2597 | if (!selectedSimulator) { |
| 2598 | return; |
| 2599 | } |
| 2600 | if (phase === "down") { |
| 2601 | setAccessibilitySelectedId(""); |
| 2602 | setAccessibilityHoveredId(null); |
| 2603 | } |
| 2604 | if ( |
| 2605 | !sendControl(selectedSimulator.udid, { |
| 2606 | type: "button", |
| 2607 | button, |
| 2608 | phase, |
| 2609 | usagePage, |
| 2610 | usage, |
| 2611 | }) |
| 2612 | ) { |
| 2613 | setLocalError("Simulator control stream disconnected."); |
| 2614 | } |
| 2615 | } |
| 2616 | |
| 2617 | function sendCrownRotation(delta: number) { |
| 2618 | if (!selectedSimulator || !Number.isFinite(delta) || delta === 0) { |
nothing calls this directly
no test coverage detected