MCPcopy Create free account
hub / github.com/altic-dev/Pilot / handleKeyDown

Method handleKeyDown

public/picker/react-component-picker.js:152–161  ·  view source on GitHub ↗

* Handle keyboard events

(event)

Source from the content-addressed store, hash-verified

150 * Handle keyboard events
151 */
152 handleKeyDown(event) {
153 if (!this.isActive) return;
154
155 // Escape key to cancel
156 if (event.key === 'Escape') {
157 event.preventDefault();
158 this.deactivate();
159 this.sendToParent({ type: 'picker-cancelled' });
160 }
161 }
162
163 /**
164 * Highlight the given element

Callers

nothing calls this directly

Calls 2

deactivateMethod · 0.95
sendToParentMethod · 0.95

Tested by

no test coverage detected