Lepik Events
An event based, Global Keyboard and Mouse listener.
Lepik Events is only part from LepikJS. Definitely try it out!
Visit LepikJS's website.
Installing
npm install lepikevents
ㅤ
New Feature v1.7.0+
LepikEvents now includes a method for capturing mouseUp and mouseDown events!
lepikevents.events.on("mouseDown", cb)
JS Array is passed to callback function. It contain these values: x, y
ㅤ
ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤLepikEventsv1.7.0
Coding
const lepikEvents = require('lepikevents');
lepikEvents.events.on('keyPress', (data) => {
console.log(data);
});
lepikEvents.events.on('keyRelease', (data) => {
console.log(data);
});
lepikEvents.events.on('mouseClick', (data) => {
console.log(data);
});
lepikEvents.events.on('mouseDoubleClick', (data) => {
console.log(data);
});
lepikEvents.events.on('mouseMove', (data) => {
console.log(data);
});
lepikEvents.events.on('mouseUp', (data) => {
console.log(data);
});
lepikEvents.events.on('mouseDown', (data) => {
console.log(data);
});
All events
Curently there are 5 events in total, mouseMove, mouseClick, mouseDoubleClick, keyPress and keyRelease.
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.