
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.
Get the state of any pressed meta keys, differentiating between their left/right location on the keyboard
Get the state of any pressed meta keys, differentiating between their left/right location on the keyboard.
keys = MetaKeys([element], [capture])Creates a new instance of meta-keys, listening to keyboard events fired on element. If element is not supplied, window will be used.
const keys = require('meta-keys')()
setInterval(function () {
if (keys.shift[0]) {
console.log('Left shift key is down')
}
if (keys.shift[1]) {
console.log('Right shift key is down')
}
}, 1000)
Optionally, you may pass capture as true to catch keyboard events before
they're caught and disabled by any other scripts. For example, this is required
in Atom:
const atomMeta = require('meta-keys')(null, true)
keys.shiftA [left, right] array of booleans, which are true when the Shift key is pressed.
keys.metaA [left, right] array of booleans, which are true when the Meta key is pressed (either the Windows key on Windows or Command on OSX).
keys.ctrlA [left, right] array of booleans, which are true when the Control key is pressed.
keys.altA [left, right] array of booleans, which are true when the Alt/Option key is pressed.
keys.dispose()Removes all attached event listeners and sets all key states to false. To be used for cleaning up after yourself if required.
MIT. See LICENSE.md for details.
FAQs
Get the state of any pressed meta keys, differentiating between their left/right location on the keyboard
The npm package meta-keys receives a total of 5 weekly downloads. As such, meta-keys popularity was classified as not popular.
We found that meta-keys 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.