pynput
robotjs
pynput | robotjs | |
---|---|---|
10 | 17 | |
1,692 | 12,115 | |
- | - | |
1.5 | 0.0 | |
5 days ago | 9 days ago | |
Python | C | |
GNU Lesser General Public License v3.0 only | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pynput
-
Installing Pynput on the Deck
Saw this post but I'm not sure if that's the solution to my problem. I'm not so familiar with Linux kernels and all that so I'm being cautious. I have more details in this post on the pynput repo
-
Alternative to pyautogui for mouse click
There's pynput but that might have the same problem. If you're on Windows AutoHotkey is an awesome way to automate mouse and keyboard actions (but it's a different language than Python, although it seems someone has made a Python wrapper for it).
-
I made a fun Polybar module that visualizes your typing speed
I updated the script to use pynput instead of xlib, meaning that according to this thread, it should also work on wayland now! If anyone would like to test this for me, please do so and report back! :-)
-
What's the alternative of Authotkey ?
Autohotkey is also a scripting language. If you want parity there, there's robotJS, pynput, and xdotool (though this one won't work on some future version of mint when a piece of tech it relies on gets upgraded).
-
Testing a python script on wine to check for windows problems, have problem i'm not sure exists in windows, help?
which is supposed to present a selection list in the console, only the selection doesn't move in wine. I don't have a test case code ready for it. Another is pynput : https://github.com/moses-palmer/pynput
-
trying to emulate keyboard and mouse without a user logged in.
I have used this module to overcome the problem. Might be helpful to you as well i guess?
-
I installed pynput with pip, but VSCode doesnt recognize it.
First thing you should do when you encounter these types of issues is go to the github repo and look at the issues other users have put up. I think this one may be relevant.
-
cx_Freeze: Program crashes as soon as it starts. Need help to fix please.
I don't know anything about cx_Freeze but the error you are getting is from pynput in this backend function: https://github.com/moses-palmer/pynput/blob/master/lib/pynput/_util/__init__.py#L49
-
Wayland python key listener (pynput alternative?)
According to https://github.com/moses-palmer/pynput/issues/184
-
check time pressed in a loop
There is not basic method. Those libraries are making OS-specific system calls that can detect keypress events. Because that's very technical it's basically unpractical to try to implement this yourself, you would normally 'just' pick a library like pygame, keyboard, pynput. If you really want to study this you could look at such a library's source code, like for pynput's code for windows see here.
robotjs
-
Painless CLI integration testing
If we talk about the first approach, the following approaches will be useful: Nodejs Child Process: write to stdin from an already initialised process, RobotJS. It makes sense to note here that the approaches above are rather for e2e testing than integration.
- RobotJs: The Only Node.js First Desktop Automation Library
-
What language next?
If you want to interact with the OS, and move the mouse, you'll likely want to write JS that targets the NodeJS platform. With a quick google search I found RobotJS which you can use with Node to automate the mouse (amongst other things). If it's a browser you want to automate, look into selenium-webdriver.
-
I recently released nut.js v3.0.0, a Node.js desktop automation framework, in line with a brand new OCR plugin and improved image search
Then there’s obviously https://github.com/robot/robot-js and https://github.com/octalmage/robotjs, but both of these frameworks are abandoned.
-
How are custom Iterables useful in JS? What are some common usecases of thing that can't be done easier any other way?
That said, you're in luck as I can give you a specific use case from the library I'm working on. It's a desktop automation library (something like RobotJS or Nut.js). I won't use the exact code, but a simplified version as an example.
-
Engaging and interesting decks are getting obscenely expensive
So what u need to do is go to a mercs bounty and afk inside it for 29 mins, then finish the fight by beating it and repeat. U will get more than 400 xp per hour with 20% boost (i think around 430? smth like that). If u go over 30 mins in the fight, u will get 0 xp so don't. Put the script on a loop and leave ur pc overnight, set hs fps to like 5 or smth from the config file (targetframerate), so ur pc uses little resources (the more gpu/cpu used the more wattage the higher the electricity bill, tho obviously it's still very worth it but the less the bill is the better). Level 100 to 400 is 300 * 1500 xp = 450 000 xp. With 10 hrs of ur pc working during the night, that is let's say 4100 xp per day, so it will take u 110 days to get from level 100 to 400. If u have work, leaving the pc on for let's say 16 hours a day (8 while u sleep and 8 while u work) will get u 7560 xp per day, getting u from 100 to level 400 in just 60 days (2 months). Make sure ur cpu gpu etc. are put on power-saving mode and turn off ur monitor (preferably even disconnect it from the power cable). Now for the script u wanna use, based on this https://thenewstack.io/which-programming-languages-use-the-least-electricity/ the best one would be C, personally i use Javascript because it's what i know and it's very easy to write and it's still 4.45 which is not that far from 1, considering it's just very simple mouse movement and a for loop and not some complex algorithm problems like in the article, it won't make much of a difference anyway, tho it might if u use python since 75.88 is a lot. So to do it with JS, u can use Node js with Robot js https://github.com/octalmage/robotjs
-
What's the alternative of Authotkey ?
Autohotkey is also a scripting language. If you want parity there, there's robotJS, pynput, and xdotool (though this one won't work on some future version of mint when a piece of tech it relies on gets upgraded).
- Need help with a simple macro program
-
I built some custom macro buttons using an Arduino Micro
I use the Johnny-Five JS library to connect to the board http://johnny-five.io/ and use RobotJS https://www.npmjs.com/package/robotjs to map the buttons on the board to keyboard buttons. Currently I just have it set up to map to audio buttons so I can prev/next/pause/play Spotify/Youtube or turn the OS volume up.
- Automation ideas with Javascript:
What are some alternatives?
python-evdev - Python bindings for the Linux input subsystem
nut.js - Native UI testing / controlling with node
sway-keylogger - Simple keylogger for Wayland compositors that are not protected against ptrace.
n8n - Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
AutoKey - AutoKey, a desktop automation utility for Linux and X11.
solidarity - Solidarity is an environment checker for project dependencies across multiple machines.
AutoHotkey - AutoHotkey - macro-creation and automation-oriented scripting utility for Windows.
ahk - Python wrapper for AutoHotkey with full type support. Harness the automation power of AutoHotkey with the beauty of Python.
Automagica - AI-powered Smart Robotic Process Automation 🤖
xkeysnail - Yet another keyboard remapping tool for X environment
android-touch-record-replay - How to record and replay touchscreen events on an Android device.