Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
kbm-robot is a module to help you emulate system wide keyboard and mouse actions. It uses java's robot class (a child process with stdio pipe communication) to help accomplish this.
Example:
var robot = require("kbm-robot");
robot.startJar();
robot.press("alt")
.press("tab")
.sleep(100)
.release("tab")
.release("alt")
.sleep(100)
.typeString("Hello World!")
.go()
.then(robot.stopJar);
npm install --save kbm-robot
var robot = require("kbm-robot");
All functions except for startJar and stopJar are chainable. You must chain them and then call .go() to have things happen.
All key strings are the same as you would find in Java's KeyEvent class: http://docs.oracle.com/javase/7/docs/api/java/awt/event/KeyEvent.html For example the string "VK_UP" would represent the up arrow key.
However this library also supplies many "shortcut" strings to get your robot typing faster. (Also add on A-Z and 0-9 as shortcuts). When using a shortcut string of A-Z, case doesn't matter.
"ESC"
"F1"
"F2"
"F3"
"F4"
"F5"
"F6"
"F7"
"F8"
"F9"
"F10"
"F11"
"F12"
"CTRL"
"META"
"SUPER"
"ALT"
" "
"SPACE"
"LEFT"
"DOWN"
"RIGHT"
"UP"
"TAB"
"SHIFT"
"ENTER"
"\n"
"CAPS_LOCK"
"PRINT_SCREEN"
"SCROLL_LOCK"
"PAUSE_BREAK"
"BACKSPACE"
"DELETE"
"HOME"
"END"
"INSERT"
"PAGE_UP"
"PAGE_DOWN"
"NUM_LOCK"
"`"
"-"
"="
"["
"]"
"\\"
";"
"'"
","
"."
"/"
"KP_ADD"
"KP_-"
"KP_*"
"KP_/"
"KP_0"
"KP_."
"KP_1"
"KP_2"
"KP_3"
"KP_4"
"KP_5"
"KP_6"
"KP_7"
"KP_8"
"KP_9"
MIT
P.S. If anyone knows how to ditch the java dependency while still having platform independent code, please let me know. I have a feeling it will be very hard to do.
FAQs
A module to help you emulate system wide keyboard and mouse actions.
The npm package kbm-robot receives a total of 0 weekly downloads. As such, kbm-robot popularity was classified as not popular.
We found that kbm-robot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.