Add interactive terminal commands

This commit is contained in:
2026-06-30 20:58:44 +00:00
parent 0e6a764aab
commit c87e510ca9
4 changed files with 504 additions and 3 deletions
@@ -87,6 +87,12 @@ export function createKeyboardHandler(options: KeyboardHandlerOptions) {
} = options;
return function handleKeydown(event: KeyboardEvent): void {
// Ignore key events originating from editable fields (e.g. command input)
const target = event.target as HTMLElement | null;
if (target && (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable)) {
return;
}
// Skip animation on Y key
if (getIsTyping() && (event.key === 'y' || event.key === 'Y')) {
event.preventDefault();