LepikJS is a Node.js package designed for managing an array of events, encompassing mouse and keyboard interactions, screen actions like print screen, and a spectrum of Windows events including application openings and closures.
One of the standout advantages of this library is its dual capability: not only can it actively listen to events, but it can also emit them. This unique trait empowers the creation of straightforward event-driven applications.
To install the library, you can use npm or yarn.
LepikJS has 10 000+ downloads via NPM.
npm:
  npm install lepikjs
        yarn add lepikjsIf you are on windows, no extra installations. You are ready to go!
          If you are on Linux, Mac, etc... You need to have Python 3.6 or higher installed for the event listening. 
          You can install it here Python.org
        
Having NodeJS ^16.x (or higher) installed is also required.
To use the library, you need to import it.
const lepik = require("lepikjs")Then you can use it.
          LepikJS has many events. 
          To listen to them, you can use the on method.
        
Listening to mouse click:
lepik.on("mouseClick", (event) => {
  console.log("Position x: " + event.x );
  console.log("Position y: " + event.y); 
  console.log("Button: " + event.button); 
})
Listening to mouse move:
lepik.on("mouseMove", (event) => {
            console.log("Position x: " + event.x );
            console.log("Position y: " + event.y); 
            console.log("Timestamp: " + event.time); 
            })
          Listening to mouse down:
lepik.on("mouseDown", (event) => {
            console.log("Position x: " + event.x );
            console.log("Position y: " + event.y); 
            })
          Listening to mouse up:
lepik.on("mouseUp", (event) => {
            console.log("Position x: " + event.x );
            console.log("Position y: " + event.y); 
            })
          Listening to mouse Double Click:
lepik.on("mouseDoubleClick", (event) => {
            console.log("Position x: " + event.x );
            console.log("Position y: " + event.y); 
            console.log("Button: " + event.button); 
            })
          Listening to key press:
 lepik.on("keyPress", (key) => {
  console.log(key + " pressed")
})
        The key parameter is the key that was pressed.
        
        Listening to key up:
lepik.on("keyUp", (key) => {
  console.log(key + " released")
})
Listening to key down:
lepik.on("keyDown", (key) => {
  console.log(key + " released")
})
Get current mouse position:
let pos = await lepik.getMousePosition()
            console.log("Position x: " + pos.x );
            console.log("Position y: " + pos.y);Get current screen size:
let size = await lepik.getScreenSize()
            console.log("Position x: " + size.width );
            console.log("Position y: " + size.height );Get get Active Window:
let window = await lepik.getActiveWindow()
            console.log("Current window: " + window);Get window title:
let windowTitle = await lepik.getWindowTitle(window)
            console.log("Window Title: " + windowTitle );Get window size:
let win = await lepik.getWindowSize(window)
            console.log("Window width: " + win.width );
            console.log("Window height: " + win.height );Emiting mouse click:
lepik.mouseClick(key,amount)Emiting mouse double-click:
lepik.mouseDoubleClick(key)Emiting mouse mouseMove:
lepik.mouseMove(x, y, absolute, duration)Emiting mouse drag:
lepik.mouseDrag(fromX,fromY,toX,toY,absolute,duration)Emiting mouse scroll:
lepik.mouseScroll(amount)Emiting key tap:
lepik.keyTap(key)Emiting keyboard write string:
lepik.write(text,duration)