Socket
Socket
Sign inDemoInstall

lepikevents

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lepikevents

Global mouse and keyboard events Listener


Version published
Weekly downloads
19
increased by46.15%
Maintainers
1
Weekly downloads
 
Created
Source

Lepik Events

An event based, Global Keyboard and Mouse listener.

NPM

Lepik Events is only part from LepikJS. Definitely try it out!

Visit LepikJS's website.

New Feature v2.0.0+

LepikEvents now does not ship whole python binary! The performance is up to 20x better with 10x smaller size! ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤLepikEventsv2.0.0 ㅤㅤ

Installing

npm install lepikevents

Hello World!

// Require lepikEvents
const lepikEvents = require('lepikevents');

lepikEvents.events.on('mouseClick', (data) => {
  console.log("Hello World!"); //Should print "Hello World!" after each click of mouse
});

Coding

// Require lepikEvents
const lepikEvents = require('lepikevents');

lepikEvents.events.on('keyPress', (data) => {
  // Returns key pressed as String 
  console.log(data); // e||esc||space||backspace ...
});

lepikEvents.events.on('keyDown', (data) => {
  // Returns key pushed as String 
  console.log(data); // e||esc||space||backspace ...
});
lepikEvents.events.on('keyUp', (data) => {
  // Returns key released as String 
  console.log(data); // e||esc||space||backspace ...
});

lepikEvents.events.on('mouseClick', (data) => {
  // Returns array containing mouse position x, y and button clicked 
  console.log(data); // [361, 235, *1]
  // *1 for left, 2 for right, 3 for middle
});

lepikEvents.events.on('mouseDoubleClick', (data) => {
  // Returns array containing mouse position x, y and button double-clicked 
  console.log(data); // [361, 235, *1]
  // *1 for left, 2 for right, 3 for middle
});

lepikEvents.events.on('mouseMove', (data) => {
  // Returns array containing mouse x, y and time (seconds)
  console.log(data); // [20, -35, 1663787912.698]
});

lepikEvents.events.on('mouseUp', (data) => {
  // Returns array containing mouse x, y
  console.log(data); // [20, 35]
});

lepikEvents.events.on('mouseDown', (data) => {
  // Returns array containing mouse x, y
  console.log(data); // [20, 75]
});

All events

Curently there are 6 events in total, mouseMove, mouseClick, mouseDoubleClick, keyPress, keyUp and keyDown.

Requirements

Lepik Events uses Python keyboard and Python mouse which runs on Python.

If your are on Windows, then you don't even have to have it installed, cause thanks to Pyinstaller, the code is compiled into executable.

If you are not using windows, you need to have atleast Python3 installed. It's better to have atleast node13 but not required.

License

The code is licensed under the MIT license (http://opensource.org/licenses/MIT). See LICENSE file.

Keywords

FAQs

Package last updated on 15 Jun 2023

Did you know?

Socket

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.

Install

Related posts

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