mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-08 14:24:03 +08:00
commit
3701380695
@ -123,7 +123,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
// 监听键盘事件
|
// 监听键盘事件
|
||||||
document.addEventListener('keydown', (e) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
const { key, ctrlKey } = e
|
const { key, ctrlKey, metaKey } = e
|
||||||
const isTab = key === 'Tab'
|
const isTab = key === 'Tab'
|
||||||
const isSearch =
|
const isSearch =
|
||||||
key === '/' ||
|
key === '/' ||
|
||||||
@ -143,7 +143,9 @@ onMounted(() => {
|
|||||||
filterText.value = ''
|
filterText.value = ''
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
}
|
}
|
||||||
} else if (ctrlKey) {
|
} else if (ctrlKey || metaKey) {
|
||||||
|
// 仅有 Ctrl时 什么也不执行
|
||||||
|
// utools模拟执行粘贴时触发
|
||||||
} else {
|
} else {
|
||||||
window.focus() // 其他键盘事件 直接聚焦搜索框
|
window.focus() // 其他键盘事件 直接聚焦搜索框
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user