Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-key-sender

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-key-sender - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

28

key-sender.js

@@ -49,11 +49,11 @@ var exec = require('child_process').exec;

module.sendKey = function(keyCode) {
module.execute([keyCode]);
return module.execute([keyCode]);
};
module.sendKeys = function(arrKeyCodes) {
module.execute(arrKeyCodes);
return module.execute(arrKeyCodes);
};
module.sendLetter = function(letter) {
module.sendKey(module.getKeyCode(letter));
return module.sendKey(module.getKeyCode(letter));
};

@@ -68,3 +68,3 @@

module.sendKey(arrKeyCodes);
return module.sendKey(arrKeyCodes);
};

@@ -82,3 +82,3 @@

module.execute(keyCodes);
return module.execute(keyCodes);
};

@@ -97,12 +97,20 @@

module.sendCombination = function(arrKeyCodes) {
module.execute([arrKeyCodes.join('-')]);
return module.execute([arrKeyCodes.join('-')]);
};
module.execute = function(arrParams) {
var jarPath = path.join(__dirname, 'jar', 'key-sender.jar');
return new Promise(function(resolve, reject) {
var jarPath = path.join(__dirname, 'jar', 'key-sender.jar');
var command = 'java -jar ' + jarPath + ' ' + arrParams.join(' ');
console.log('Sending: ' + command);
var command = 'java -jar ' + jarPath + ' ' + arrParams.join(' ');
console.log('Sending: ' + command);
exec(command);
return exec(command, {}, function(error, stdout, stderr) {
if (error == null) {
resolve(stdout, stderr);
} else {
reject(error, stdout, stderr);
}
});
});
};

@@ -109,0 +117,0 @@

{
"name": "node-key-sender",
"version": "1.0.3",
"version": "1.0.4",
"description": "Lib to send keystrokes to the operation system.",

@@ -5,0 +5,0 @@ "main": "key-sender.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc