MCPcopy
hub / github.com/codeaashu/claude-code / handleKeyDown

Function handleKeyDown

src/components/tasks/RemoteSessionDetailDialog.tsx:812–828  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

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> {

Callers

nothing calls this directly

Calls 4

handleTeleportFunction · 0.85
handleCloseFunction · 0.85
preventDefaultMethod · 0.80
onDoneFunction · 0.50

Tested by

no test coverage detected