
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.
ember-cli-keyboard-actions
Advanced tools
EmberCLI addon to generate components that can respond to keyboard events.
A small mixin to make intercepting keyboard events easier to pick up and react to.
ember install:addon ember-cli-keyboard-actions
###v0.3.0
###v0.2.1
###v0.2.0
###v0.1.5
###v0.1.4
###v0.1.3
Simply import the mixin at the top of your component or view
import KeyboardActionsMixin from 'ember-cli-keyboard-actions/mixins/keyboard-actions.js'
and pass it to your component or view as you would any other mixin.
export default Ember.Component.extend(
KeyboardActionsMixin,
{
}
);
Create an object on your component or view with one of the following keys to respond to the correct event:
Within this object, specific key events can be defined using either the name of the key, or the word 'key' followed by the correct keyCode.
keyDownActions: {
backspace: function () {
console.log('Backspace pressed');
},
key27: function () {
console.log('Escape pressed');
}
}
Alternatively, setting a string as the action will attempt to resolve the corresponding function from the view.
doSomeStuff: function () {
console.log('Did some stuff');
},
keyDownActions: {
backspace: 'doSomeStuff'
},
Key names currently supported:
Actions can also be hooked in to a number of 'range' events, for instance declaring a keyDownAction 'alphanumeric' will trigger whenever an alphanumeric key is pressed.
Key ranges currently supported:
A special set of actions can be defined under the key keyChordActions
that can be used to assign actions to keys pressed while CTRL, ALT or
SHIFT are being held down.
keyChordActions: {
'ctrl': {
'a': function () {
console.log('Ctrl + A pressed');
}
},
'alt': {
'a': function () {
console.log('Alt + A pressed');
}
},
'shift': {
'a': function () {
console.log('Shift + A pressed');
}
},
'ctrl.alt': {
'a': function () {
console.log('Ctrl, Alt + A pressed');
}
},
'ctrl.alt.shift': {
'a': function () {
console.log('Ctrl, Shift, Alt + A pressed');
}
}
},
import Ember from 'ember';
import KeyboardActionMixin from 'ember-cli-keyboard-actions/mixins/keyboard-actions.js';
export default Ember.Component.extend(
KeyboardActionMixin,
{
doSomeStuff: function () {
console.log('Did some stuff');
},
recogniseAlphaEvent: function () {
console.log('Alpha event');
},
keyDownActions: {
backspace: 'doSomeStuff',
alpha: 'recogniseAlphaEvent',
numeric: function () {
console.log('Numeric event');
}
},
keyUpActions: {
escape: function () {
console.log('Tab pressed on keyUp');
}
},
keyPressActions: {
key101: function () {
console.log('Left pressed on keyPress');
}
}
}
);
For more information on using ember-cli, visit http://www.ember-cli.com/.
FAQs
EmberCLI addon to generate components that can respond to keyboard events.
The npm package ember-cli-keyboard-actions receives a total of 4 weekly downloads. As such, ember-cli-keyboard-actions popularity was classified as not popular.
We found that ember-cli-keyboard-actions 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.