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

electron-localshortcut

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-localshortcut - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

17

index.js

@@ -6,3 +6,2 @@ 'use strict';

const {toKeyEvent} = require('keyboardevent-from-electron-accelerator');
const insp = require('insp');
const _debug = require('debug');

@@ -132,10 +131,10 @@

debug(insp`before-input-event: ${input} is translated to: ${event}`);
debug(`before-input-event: ${input} is translated to: ${event}`);
for (const {eventStamp, callback} of shortcutsOfWindow) {
if (equals(eventStamp, event)) {
debug(insp`eventStamp: ${eventStamp} match`);
debug(`eventStamp: ${eventStamp} match`);
callback();
return;
}
debug(insp`eventStamp: ${eventStamp} no match`);
debug(`eventStamp: ${eventStamp} no match`);
}

@@ -250,2 +249,6 @@ };

} else {
if (win.isDestroyed()) {
debug(`Early return because window is destroyed.`);
return;
}
wc = win.webContents;

@@ -255,2 +258,3 @@ }

debug(`Unregistering callback for ${accelerator} on window ${title(win)}`);
_checkAccelerator(accelerator);

@@ -260,2 +264,7 @@

if (!windowsWithShortcuts.has(wc)) {
debug(`Early return because window has never had shortcuts registered.`);
return;
}
const shortcutsOfWindow = windowsWithShortcuts.get(wc);

@@ -262,0 +271,0 @@

{
"name": "electron-localshortcut",
"version": "3.0.1",
"version": "3.0.2",
"description": "register/unregister a keyboard shortcut locally to a BrowserWindow instance, without using a Menu",

@@ -38,3 +38,2 @@ "repository": "parro-it/electron-localshortcut",

"electron-is-accelerator": "^0.1.0",
"insp": "^0.1.0",
"keyboardevent-from-electron-accelerator": "^0.7.0",

@@ -41,0 +40,0 @@ "keyboardevents-areequal": "^0.2.1"

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