Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
lepikevents
Advanced tools
Readme
An event based, Global Keyboard and Mouse listener.
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
npm install lepikevents
// Require lepikEvents
const lepikEvents = require('lepikevents');
lepikEvents.events.on('mouseClick', (data) => {
console.log("Hello World!"); //Should print "Hello World!" after each click of mouse
});
// 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]
});
Curently there are 7 events in total, mouseMove, mouseClick, mouseDown, mouseUp, keyPress, keyUp and keyDown.
Lepik Events uses native c++ winapi on windows, so you don't have to have anything installed.
On unix systems, it uses Python keyboard and Python mouse which runs on Python. So python is needed on non-windows systems. You need to have atleast Python3 installed.
Windows systems: Nothing needed Unix systems: Python3
PS: It's better to have atleast node13 but not required.
The code is licensed under the MIT license (http://opensource.org/licenses/MIT). See LICENSE file.
FAQs
Global mouse and keyboard events Listener
The npm package lepikevents receives a total of 5 weekly downloads. As such, lepikevents popularity was classified as not popular.
We found that lepikevents demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.