Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

atom-keymap

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atom-keymap - npm Package Compare versions

Comparing version 0.12.0 to 0.13.0

3

lib/helpers.js

@@ -74,2 +74,5 @@ (function() {

}
if (key === "meta" || key === "shift" || key === "control" || key === "alt") {
key = null;
}
if (event.metaKey) {

@@ -76,0 +79,0 @@ keystroke.push('cmd');

28

lib/keymap.js
(function() {
var CSON, CommandEvent, Emitter, File, KeyBinding, Keymap, OtherPlatforms, Platforms, fs, isAtomModifier, keydownEvent, keystrokeForKeyboardEvent, normalizeKeystrokes, path, _ref,
var CSON, CommandEvent, Emitter, File, KeyBinding, Keymap, OtherPlatforms, Platforms, fs, isAtomModifier, keydownEvent, keystrokeForKeyboardEvent, normalizeKeystrokes, path, _, _ref,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
_ = require("underscore-plus");
CSON = require('season');

@@ -138,3 +140,3 @@

Keymap.prototype.handleKeyboardEvent = function(event, replaying) {
var currentTarget, enableTimeout, exactMatch, exactMatchCandidates, foundMatch, keystroke, keystrokes, partialMatchCandidates, partialMatches, target, _i, _len, _ref1, _ref2;
var currentTarget, enableTimeout, exactMatch, exactMatchCandidates, exactMatches, foundMatch, keystroke, keystrokes, partialMatchCandidates, partialMatches, target, _i, _len, _ref1;
keystroke = this.keystrokeForKeyboardEvent(event);

@@ -157,5 +159,5 @@ if (this.queuedKeystrokes.length > 0 && isAtomModifier(keystroke)) {

while ((currentTarget != null) && currentTarget !== document) {
_ref2 = this.findExactMatches(exactMatchCandidates, currentTarget);
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
exactMatch = _ref2[_i];
exactMatches = this.findExactMatches(exactMatchCandidates, currentTarget);
for (_i = 0, _len = exactMatches.length; _i < _len; _i++) {
exactMatch = exactMatches[_i];
if (exactMatch.command === 'native!') {

@@ -172,2 +174,7 @@ this.clearQueuedKeystrokes();

if (this.dispatchCommandEvent(exactMatch.command, target, event)) {
this.emit('matched', {
keystrokes: keystrokes,
binding: exactMatch,
keyboardEventTarget: target
});
return;

@@ -182,4 +189,13 @@ }

enableTimeout = foundMatch != null ? foundMatch : this.pendingStateTimeoutHandle != null;
return this.enterPendingState(partialMatches, enableTimeout);
this.enterPendingState(partialMatches, enableTimeout);
return this.emit('matched-partially', {
keystrokes: keystrokes,
partiallyMatchedBindings: partialMatches,
keyboardEventTarget: target
});
} else {
this.emit('match-failed', {
keystrokes: keystrokes,
keyboardEventTarget: target
});
return this.terminatePendingState();

@@ -186,0 +202,0 @@ }

{
"name": "atom-keymap",
"version": "0.12.0",
"version": "0.13.0",
"description": "Atom's DOM-aware keymap module",

@@ -30,3 +30,4 @@ "main": "./lib/keymap",

"pathwatcher": "^1.0.0",
"emissary": "^1.1.0"
"emissary": "^1.1.0",
"underscore-plus": "^1.0.0"
},

@@ -33,0 +34,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc