mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-09 15:34:04 +08:00
fix: Mac下Command+C
复制不生效 #17
This commit is contained in:
parent
b55b66271d
commit
d5f5d123d5
@ -82,11 +82,11 @@ watch(
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 监听键盘事件
|
// 监听键盘事件
|
||||||
document.addEventListener('keydown', (e) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
const { key, ctrlKey } = e
|
const { key, ctrlKey, metaKey } = e
|
||||||
const isArrowUp = key === 'ArrowUp'
|
const isArrowUp = key === 'ArrowUp'
|
||||||
const isArrowDown = key === 'ArrowDown'
|
const isArrowDown = key === 'ArrowDown'
|
||||||
const isEnter = key === 'Enter'
|
const isEnter = key === 'Enter'
|
||||||
const isCopy = ctrlKey && (key === 'C' || key === 'c')
|
const isCopy = (ctrlKey || metaKey) && (key === 'C' || key === 'c')
|
||||||
if (isArrowUp) {
|
if (isArrowUp) {
|
||||||
if (activeIndex.value > 0) {
|
if (activeIndex.value > 0) {
|
||||||
activeIndex.value--
|
activeIndex.value--
|
||||||
|
Loading…
x
Reference in New Issue
Block a user