style(figlet): update default text and remove search keyboard hint

This commit is contained in:
2026-02-23 09:46:35 +01:00
parent 6fbcdd3674
commit 90b045f349
7 changed files with 7 additions and 162 deletions

View File

@@ -1,34 +0,0 @@
'use client';
import { useEffect } from 'react';
export interface KeyboardShortcut {
key: string;
ctrlKey?: boolean;
metaKey?: boolean;
shiftKey?: boolean;
handler: () => void;
description: string;
}
export function useKeyboardShortcuts(shortcuts: KeyboardShortcut[]) {
useEffect(() => {
const handleKeyDown = (event: KeyboardEvent) => {
for (const shortcut of shortcuts) {
const keyMatches = event.key.toLowerCase() === shortcut.key.toLowerCase();
const ctrlMatches = shortcut.ctrlKey ? event.ctrlKey || event.metaKey : !event.ctrlKey && !event.metaKey;
const metaMatches = shortcut.metaKey ? event.metaKey : true;
const shiftMatches = shortcut.shiftKey ? event.shiftKey : !event.shiftKey;
if (keyMatches && ctrlMatches && shiftMatches) {
event.preventDefault();
shortcut.handler();
break;
}
}
};
window.addEventListener('keydown', handleKeyDown);
return () => window.removeEventListener('keydown', handleKeyDown);
}, [shortcuts]);
}