Refactor InputAgent into STFService. Support copypasting (only pasting implemented in the UI right now though).

This commit is contained in:
Simo Kinnunen
2014-04-01 11:47:20 +09:00
parent 514fc3554d
commit 09eb8c539d
13 changed files with 379 additions and 50 deletions

View File

@@ -78,6 +78,20 @@ module.exports = function ControlServiceFactory(
})
}
this.paste = function(text) {
var tx = TransactionService.create(target)
socket.emit('clipboard.paste', channel, tx.channel, {
text: text
})
return tx
}
this.copy = function() {
var tx = TransactionService.create(target)
socket.emit('clipboard.copy', channel, tx.channel)
return tx
}
this.shell = function(command) {
var tx = TransactionService.create(target)
socket.emit('shell.command', channel, tx.channel, {