mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-09-27 13:53:21 +08:00
feat: 区分左右键点击 左键自动粘贴 右键仅复制
This commit is contained in:
@@ -155,6 +155,14 @@ const copy = (item) => {
|
||||
utools.hideMainWindow()
|
||||
}
|
||||
|
||||
const paste = () => {
|
||||
if (utools.isMacOs()) {
|
||||
utools.simulateKeyboardTap('v', 'command')
|
||||
} else {
|
||||
utools.simulateKeyboardTap('v', 'ctrl')
|
||||
}
|
||||
}
|
||||
|
||||
const path = `${home}\\${dbName}`
|
||||
const db = new DB(path)
|
||||
db.init()
|
||||
@@ -174,5 +182,6 @@ watchClipboard(db, (item) => {
|
||||
|
||||
window.db = db
|
||||
window.copy = copy
|
||||
window.paste = paste
|
||||
window.openFile = utools.shellOpenPath
|
||||
window.getIcon = utools.getFileIcon
|
||||
|
Reference in New Issue
Block a user