This commit is contained in:
fofolee
2019-09-04 22:25:55 +08:00
parent 02bc5e4bf0
commit de8f546032
7 changed files with 23 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
const { clipboard } = require('electron');
const { exec } = require('child_process');
const robot = require('./robotjs')
const robot = utools.robot
//-------checkUpdate------
const fs = require('fs');
@@ -62,6 +62,11 @@ copyTo = text => {
clipboard.writeText(text)
}
copy = () => {
var ctlKey = isWin ? 'control' : 'command';
robot.keyTap('c', ctlKey);
}
paste = () => {
var ctlKey = isWin ? 'control' : 'command';
robot.keyTap('v', ctlKey);