Nickelback Plays Music

    lepikjs
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.17 • Public • Published

    Visit LepikJS's website.

    LepikJS

    A python based, Global Keyboard and Mouse event emmiter.

    NPM

    Installing

    npm install lepikjs
    

    Coding

    // Require lepikEvents
    const lepik = require('lepikjs');
    
    // On every mouse click, move the cursor down a bit
    lepik.on("mouseClick", (data) => {
      console.log(data) // { x: 786, y: 171, button: 1 }
      lepik.mouseMove(0, 100)
    })

    All Methods

    const lepik = require('lepikjs');
    
    // Mouse events
    lepik.mouseMove(x, y, absolute, duration)
    //Absolute and duration are optional. Default false and 0.2
    lepik.mouseClick(key)
    //Key is optional. Default is "left"
    lepik.mouseDoubleClick(key)
    //Key is optional. Default is "left"
    lepik.mouseDrag(fromX,fromY,toX,toY,absolute,duration)
    //Absolute and duration are optional. Default false and 0.2
    lepik.mouseScroll(amount)
    //Positive amount scrolls up, negative down. Default is 1
    lepik.getMousePosition()
    //Returns object { x: 719, y: 461 }
    
    
    // Keyboard events
    lepik.keyTap(char)
    //Char need to be single letter
    lepik.write(string, duration)
    //Duration is optional. Default is 0.1
    
    // Screen events
    // Coming soon
    
    // Global Listeners
    lepik.on("mouseClick",(data)=>{
      console.log(data) // { x: 753, y: 241, button: 1 }
    })
    lepik.on("mouseDoubleClick",(data)=>{
      console.log(data) // { x: 753, y: 241, button: 1 }
    })
    lepik.on("keyPress",(data)=>{
      console.log(data) // Returns key pressed
    })
    lepik.on("keyRelease",(data)=>{
      console.log(data) // Returns key released
    })
    
    // Controls
    lepik.start() 
    //  Code inside these methods will get executed as single proccess. Meaning faster results
    lepik.end() 
    
    // Test
    lepik.log()
    // Returns string "Hello from LepikJS!" (passing string as argument is allowed)

    Requirements

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

    License

    LepikJS is freely distributable under the terms of the MIT license. See LICENSE.md.

    Install

    npm i lepikjs

    DownloadsWeekly Downloads

    7

    Version

    1.2.17

    License

    MIT

    Unpacked Size

    8.01 MB

    Total Files

    60

    Last publish

    Collaborators

    • borecjeborec1