
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
keyboard-tracker
Advanced tools
Simple, zero dependency keyboard tracker for JS.
<script type="text/javascript" src="https://unpkg.com/keyboard-tracker"></script>
new KeyboardTracker(handler[, options])
handler
<Function, Object>
:
<Function>
: Receives one argument which contains the key which was pressed and any data the tracker has captured on that key.<Object>
: Will execute the function which key matches the key pressed. Can also contain a default
property with a function to run if no matching key is found. Functions behave identically to the <Function>
behaviour above.options
<Object>
:
persistence
<Boolean>
: Set to true to save data between sessions using localStorage
. Defaults to false
.history
<Boolean>
: Set to true to save every event with its timestamp. Defaults to false
.scope
<Element>
: The element to attach the event listeners to. Defaults to window
.const tracker = new KeyboardTracker({ 'a': (e) => console.log(e) }, { history: true })
// press 'a' key
// => { key: 'a', pressed: true, total: 1, latest: 1520181191972, history: [{ state: 'down', timestamp: 1520181191972 }] }
FAQs
Zero config keyboard tracker for JS.
We found that keyboard-tracker 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.