
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
angular-keydown
Advanced tools
Angular service for keydown detection
Sometimes, it could be useful to detect a pressed key during a click or another event. Let's say you have a validation button. It would rock if it pops up a confirmation message when you click on it, but not if you hold the shift key, right ?
Angular-keydown makes it really easy!
http://msieurtoph.github.io/angular-keydown
npm i angular-keydown --save
Please, visit http://msieurtoph.github.io/angular-keydown for live examples.
angular.module('', ['msieurtoph.ngKeydown'])
.directive('myTest', ['Keydown', function(Keydown){
return {
restrict: 'A',
link: function(scope){
scope.click = function(){
if (Keydown.shift){
scope.message = 'Shift key has been pressed when clicking!';
} else {
scope.message = 'Shift key nas not been pressed when clicking!';
}
};
}
}]);
});
<button my-test ng-click="click()">Hold shift key and click me</button>
<pre ng-bind="message"></pre>
The service lets you know whether the following keys are pressed :
shift, ctrl, altup, down, right, left arrowspgUp, pgDownspace, escape, enter, tabFor other keys you can look to Keydown.others[_theKeyCode_]
For instance, Keydown.others[65] will equal true if the a key is down.
Keydown.pressed gives you the list of pressed keys.
For instance, if a, b and c keys are down, Keydown.pressed will equal [65, 66, 67]
FAQs
Angular service for keydown detection
The npm package angular-keydown receives a total of 6 weekly downloads. As such, angular-keydown popularity was classified as not popular.
We found that angular-keydown 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.