
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
some browsers have got an e.key attribute that is submitted with keydown and keyup events.
chrome (and other browsers) does not have a e.key attribute.
there are also inconsistencies between different browsers.
@chrisdickinson initiated a project vkey to collect the different definitions and merge them into a unified definition.
for code that can not handle spaces, or wants less clutter, this transformation might be useful.
this module transforms the vkey definition, and removes the following clutter:
spaces< and >-toLowerCase()the output is a static key mapping file (without dynamic edge cases): vkeys.js
npm install vkeys
var vkeys = require('./vkeys');
window.addEventListener('keydown', function(e) {
console.log(vkeys[e.keyCode])
});
Object with {code : key} pairs.
{
0: 'unk',
...
8: 'backspace',
9: 'tab',
12: 'clear',
13: 'enter',
...
254: 'clear'
}
see: vkeys.js
return the key for the given code.
var key = vkeys.getKey(60);
assert.equal(key, '<');
returns the first code that matches the key.
var code = vkeys.findCode('space');
assert.equal(code, 32);
returns an Array of code's that match the key.
var code = vkeys.findAllCodes('meta');
// code equals [91, 92, 223, 224]
npm install --save-dev vkeynpm run buildnpm install -g browserify testling
npm run test
MIT
FAQs
map e.keyCode to vkey string
The npm package vkeys receives a total of 198 weekly downloads. As such, vkeys popularity was classified as not popular.
We found that vkeys 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.