mirror of
https://github.com/pheralb/svgl.git
synced 2025-03-12 16:10:34 +08:00
Merge pull request #205 from ridemountainpig/hotkey-unuse
Remove search input hotkey unuse code
This commit is contained in:
commit
d0a69a3c52
@ -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…
x
Reference in New Issue
Block a user