You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

browser-forward-keyboard-listener

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-forward-keyboard-listener - npm Package Compare versions

Comparing version

to
1.1.1

dist/keys.d.ts

9

dist/client.js

@@ -35,2 +35,3 @@ // Create WebSocket connection.

const handleKeyDown = (key) => {
// prevent this event to keep firing when the key is held down
if (activeKeys.has(key))

@@ -53,15 +54,15 @@ return;

e.preventDefault();
handleKeyDown(e.key.toLowerCase());
handleKeyDown(e.code);
});
document.addEventListener('keyup', function (e) {
e.preventDefault();
handleKeyUp(e.key.toLowerCase());
handleKeyUp(e.code);
});
document.addEventListener('mousedown', function (e) {
e.preventDefault();
handleKeyDown("mouse" + e.button);
handleKeyDown("Mouse" + e.button);
});
document.addEventListener('mouseup', function (e) {
e.preventDefault();
handleKeyUp("mouse" + e.button);
handleKeyUp("Mouse" + e.button);
});

@@ -68,0 +69,0 @@ document.addEventListener('contextmenu', (e) => e.preventDefault());

export * from "./KeyListenersManager";
export * from "./keys";
export declare function initKeyboardListener(): void;

@@ -9,2 +9,4 @@ "use strict";

__export(require("./KeyListenersManager"));
__export(require("./keys"));
// open the browser and start listening to user input
function initKeyboardListener() {

@@ -11,0 +13,0 @@ const port = process.env.PORT || 3000;

{
"name": "browser-forward-keyboard-listener",
"description": "capture mouse and keyboard event from browser and send them back via WS",
"version": "1.1.0",
"version": "1.1.1",
"private": false,

@@ -9,2 +9,3 @@ "main": "dist/index.js",

"scripts": {
"build": "tsc",
"tsc": "tsc"

@@ -11,0 +12,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet