mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-10 14:46:54 +08:00
chore: remove hotkey unuse code
This commit is contained in:
parent
d4cb71cb12
commit
0588374475
@ -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') {
|
||||||
|
Loading…
Reference in New Issue
Block a user