(e: KeyboardEvent)
| 810 | // Component-specific shortcuts shown in UI hints (t=teleport, space=dismiss, |
| 811 | // left=back). These are state-dependent actions, not standard dialog keybindings. |
| 812 | const handleKeyDown = (e: KeyboardEvent) => { |
| 813 | if (e.key === ' ') { |
| 814 | e.preventDefault(); |
| 815 | onDone('Remote session details dismissed', { |
| 816 | display: 'system' |
| 817 | }); |
| 818 | } else if (e.key === 'left' && onBack) { |
| 819 | e.preventDefault(); |
| 820 | onBack(); |
| 821 | } else if (e.key === 't' && !isTeleporting) { |
| 822 | e.preventDefault(); |
| 823 | void handleTeleport(); |
| 824 | } else if (e.key === 'return') { |
| 825 | e.preventDefault(); |
| 826 | handleClose(); |
| 827 | } |
| 828 | }; |
| 829 | |
| 830 | // Handle teleporting to remote session |
| 831 | async function handleTeleport(): Promise<void> { |
nothing calls this directly
no test coverage detected