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.0.6

5

dist/client.js

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

const handleMouseMove = (e) => {
console.log('move');
socket.send(JSON.stringify({ type: 'mouseMove', x: e.movementX, y: e.movementY }));

@@ -25,7 +26,7 @@ };

// Enable the mousemove listener
el.addEventListener('mousemove', handleMouseMove);
document.addEventListener('mousemove', handleMouseMove);
}
else {
// Pointer was just unlocked
el.remove();
document.removeEventListener('mousemove', handleMouseMove);
document.body.style.backgroundColor = 'white';

@@ -32,0 +33,0 @@ socket.send(JSON.stringify({ type: 'exit' }));

2

package.json
{
"name": "browser-forward-keyboard-listener",
"description": "capture mouse and keyboard event from browser and send them back via WS",
"version": "1.0.5",
"version": "1.0.6",
"private": false,

@@ -6,0 +6,0 @@ "main": "dist/index.js",

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

const handleMouseMove = (e:any)=>{
console.log('move');
socket.send(JSON.stringify({type:'mouseMove', x: e.movementX, y: e.movementY}))

@@ -31,6 +32,6 @@ };

// Enable the mousemove listener
el.addEventListener('mousemove', handleMouseMove);
document.addEventListener('mousemove', handleMouseMove);
} else {
// Pointer was just unlocked
el.remove();
document.removeEventListener('mousemove', handleMouseMove);
document.body.style.backgroundColor = 'white';

@@ -37,0 +38,0 @@ socket.send(JSON.stringify({type:'exit'}))

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet