chore: remove hotkey unuse code

This commit is contained in:
ridemountainpig 2024-01-09 09:22:58 +08:00
parent d4cb71cb12
commit 0588374475

View File

@ -5,17 +5,8 @@
export let clearSearch: () => void; export let clearSearch: () => void;
import X from 'phosphor-svelte/lib/X'; import X from 'phosphor-svelte/lib/X';
let shortcutText: string = '';
let inputElement; let inputElement;
if (typeof window !== 'undefined') {
if (navigator.platform.toUpperCase().indexOf('MAC') !== -1) {
shortcutText = 'command';
} else {
shortcutText = 'control';
}
}
function focusInput(node: HTMLElement) { function focusInput(node: HTMLElement) {
const handleKeydown = (event: KeyboardEvent) => { const handleKeydown = (event: KeyboardEvent) => {
if ((event.metaKey || event.ctrlKey) && event.key === 'k') { if ((event.metaKey || event.ctrlKey) && event.key === 'k') {