From 039bf5ae0e0a4f16f652be8571c08e5bd62dc201 Mon Sep 17 00:00:00 2001 From: Alexander Drozdov Date: Mon, 30 Mar 2020 15:53:18 +0300 Subject: [PATCH] allow Alt --- src/main/positioning.ts | 4 ++-- src/main/shortcuts.ts | 3 --- src/web/settings/hotkeys.vue | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/positioning.ts b/src/main/positioning.ts index 32cd3f7c..4c5106d3 100644 --- a/src/main/positioning.ts +++ b/src/main/positioning.ts @@ -147,8 +147,8 @@ export function setupShowHide () { shell.openExternal(link) }) - ioHook.on('mousemove', (e: { x: number, y: number, ctrlKey?: boolean, shiftKey?: boolean }) => { - const modifier = e.ctrlKey ? 'Ctrl' : e.shiftKey ? 'Shift' : undefined + ioHook.on('mousemove', (e: { x: number, y: number, ctrlKey?: boolean, altKey?: boolean }) => { + const modifier = e.ctrlKey ? 'Ctrl' : e.altKey ? 'Alt' : undefined if (!isPollingClipboard && checkPressPosition && isWindowShown && !isWindowLocked && modifier !== config.get('priceCheckKeyHold')) { const mousePos = mousePosFromEvent(e) const distance = Math.hypot(mousePos.x - checkPressPosition.x, mousePos.y - checkPressPosition.y) diff --git a/src/main/shortcuts.ts b/src/main/shortcuts.ts index 285275b4..7844cb11 100644 --- a/src/main/shortcuts.ts +++ b/src/main/shortcuts.ts @@ -39,9 +39,6 @@ function priceCheck (lockedMode: boolean) { robotjs.keyTap('C', ['Ctrl']) } } else { - if (config.get('priceCheckLocked')!.includes('Alt')) { - robotjs.keyToggle('Alt', 'up') - } robotjs.keyTap('C', ['Ctrl']) } } diff --git a/src/web/settings/hotkeys.vue b/src/web/settings/hotkeys.vue index 31a17011..76f4796b 100644 --- a/src/web/settings/hotkeys.vue +++ b/src/web/settings/hotkeys.vue @@ -6,8 +6,8 @@
Auto-hide Mode - - + + + +