allow Alt

This commit is contained in:
Alexander Drozdov
2020-03-30 15:53:18 +03:00
parent 8754f67106
commit 039bf5ae0e
3 changed files with 4 additions and 7 deletions
+2 -2
View File
@@ -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)
-3
View File
@@ -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'])
}
}
+2 -2
View File
@@ -6,8 +6,8 @@
<div class="flex">
<span class="text-gray-500 mr-2">Auto-hide Mode</span>
<button :class="{ border: config.priceCheckKeyHold === 'Ctrl' }" @click="config.priceCheckKeyHold = 'Ctrl'" class="rounded px-1 bg-gray-900 leading-none mr-1">Ctrl</button>
<button :class="{ border: config.priceCheckKeyHold === 'Shift' }" @click="config.priceCheckKeyHold = 'Shift'" class="rounded px-1 bg-gray-900 leading-none">Shift</button>
<span class="mx-3">+</span>
<button :class="{ border: config.priceCheckKeyHold === 'Alt' }" @click="config.priceCheckKeyHold = 'Alt'" class="rounded px-1 bg-gray-900 leading-none">Alt</button>
<span class="mx-4">+</span>
<hotkey-input v-model="config.priceCheckKey" :forbidden="['Ctrl','Shift','Alt','C','V']" required class="w-20" />
</div>
</div>