
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
react-hotkey
Advanced tools
A simple mixin for application hotkeys.
Provides a react synthetic event to the named event handler, but only when the component is mounted.
For more info, check out the demo from the example folder.
npm install react-hotkey --save
As of version 0.7.0, React 15.4+ is required. If you're using an older version of react, then you should stick with 0.6.0.
var hotkey = require('react-hotkey');
// Enable event listening, can be safely called multiple times
hotkey.activate();
// The default is to listen for 'keyup' but you can listen to others by passing an argument
hotkey.activate('keydown');
React.createClass({
mixins: [hotkey.Mixin('handleHotkey')],
handleHotkey: function(e) {
// receives a React Keyboard Event
// http://facebook.github.io/react/docs/events.html#keyboard-events
}
})
React Mixins do not work with ES2015. Instead one may use the addHandler
and removeHandler
functions:
import React from 'react';
import hotkey from 'react-hotkey';
hotkey.activate();
class MyComponent extends React.Component {
constructor() {
this.hotkeyHandler = this.handleHotkey.bind(this);
}
handleHotkey(e) {
console.log("hotkey", e);
}
componentDidMount() {
hotkey.addHandler(this.hotkeyHandler);
}
componentWillUnmount() {
hotkey.removeHandler(this.hotkeyHandler);
}
}
This approach was extracted from react-bootstrap.
MIT
FAQs
A simple mixin for application hotkeys with react
The npm package react-hotkey receives a total of 44 weekly downloads. As such, react-hotkey popularity was classified as not popular.
We found that react-hotkey 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.