Skip to main content
Filter by
Sorted by
Tagged with
7 votes
2 answers
202 views

I want to make an autoclicker that can toggle on and off using = only activates the autoclicker if I hold the left mouse button. However, the emulated clicks using pynput are being detected as me ...
ToeSpreader's user avatar
0 votes
1 answer
69 views

I want to create an autoclicker with the following requirements: Support for left and right mouse buttons: the autoclicker starts as soon as the corresponding mouse button is pressed. Remains active ...
user avatar
0 votes
1 answer
94 views

I'm looking for a way of retrieving the current X+Y coordinates of the mouse cursor in python without using the PyAutoGUI library. pyautogui.position() works, but I want to avoid dependencies like ...
Red_byte's user avatar
  • 376
0 votes
1 answer
63 views

I'm trying to write a click bot that can read and write (record). So I need a click listener. Since pyautogui doesnt have a click listener, I'm using pynput. But pynput only returns the X,Y click for ...
Rhys's user avatar
  • 5,428
1 vote
0 answers
72 views

I've got a webapp with an iframe embedded in it, and have been using pynput as a way to detect the mouse inputs on this webapp. Trouble is, when using the touchscreen to click on the iframe it no ...
stackmac's user avatar
-2 votes
1 answer
164 views

I'm trying to click a windows application window while its in a minimized state (don't maximize). The following code is able to take a snapshot image of a minimized application, then perform image ...
Rhys's user avatar
  • 5,428
0 votes
1 answer
80 views

How to monitor keyboard input while GTA5 is running using python script. I want to press a key while the game is running to directly terminate the game process.I’ve tried using the keyboard and pynput ...
Jay's user avatar
  • 1
2 votes
1 answer
61 views

So I have written this Python script to vote repeatedly (It's allowed) for a friend on a show at a local TV station. import os import time from pynput.keyboard import Key, Controller os.system("...
ferd's user avatar
  • 51
0 votes
0 answers
98 views

I am trying to get pynput working on my raspberry pi 4. I tried using the example "monitoring keyboard" script from pynput and I am getting exactly the same issue as in this post. I am using ...
Benjamin Tse's user avatar
0 votes
1 answer
1k views

so when ever I try to import the keyboard module in the terminal I tipe: pip3 install keyboard and I get a really long error message: × This environment is externally managed ╰─> To install Python ...
Ekain Martin's user avatar
1 vote
0 answers
245 views

I’m trying to use the pynput library to capture key presses and releases in Python, but the listener is not responding to key events as expected. I’m running the script in a virtual environment on ...
Luis Valdo's user avatar
0 votes
0 answers
118 views

I'm developing a Python-based keylogger. The script runs without errors but does not show captured keystrokes on Windows 11. I expected it to log keystrokes in a file, but during the decryption phase ...
Keyser Söze's user avatar
0 votes
1 answer
193 views

The problem I'm having is that I can't add the PyNput module to my environment in Replit. I'm getting this error when I click "install": warning: no previously-included files found matching '...
itsThatCoderboy's user avatar
0 votes
0 answers
104 views

import pynput import time def _flush_input(): try: import msvcrt while msvcrt.kbhit(): msvcrt.getch() except ImportError: import sys, termios ...
amit omer's user avatar
0 votes
0 answers
116 views

I am making a program that can store a clipboard history that you can scroll through to choose what to paste. I want some ghost text to appear (where your text cursor is) of what you currently have in ...
E-Gamma-102's user avatar
0 votes
1 answer
182 views

Here is the keyboard and mouse listener part of my code: python def mouse_listener(scroller): """Listens for mouse scroll events to scroll clipboard history.""" ...
E-Gamma-102's user avatar
0 votes
1 answer
61 views

I want to detect when I press the "space" bar key using python and pynput. I tried their documentation, my old code but nothing works anymore on MacOS 15.1.1. Even running the script using ...
Kodeur_Kubik's user avatar
0 votes
0 answers
51 views

I had a <71> in pynput keyboard .txt file made but I do not know what pressed. I know that by pressing some keys like the numpad it takes numbers between <> but <71> is unknown for ...
Milton Coronel 's user avatar
3 votes
1 answer
658 views

I try to get this example code for pynput working: from pynput import keyboard def on_activate_h(): print('<ctrl>+<alt>+h pressed') def on_activate_i(): print('<ctrl>+<...
JulianG's user avatar
  • 31
3 votes
1 answer
432 views

I am trying to get mouse click event from the listener of the pynput package, but it's not working. def init_listeners(self): try: self.mouse_listener = mouse.Listener( on_move=...
Russell's user avatar
  • 51
0 votes
0 answers
97 views

I'm new to the mac environment and have never had issues loading tkinter apps on a windows computer. Working on a new basic script to just automate filling out a google form for the sake of my sanity ...
Lauren Aslak's user avatar
0 votes
2 answers
93 views

Is there any way to execute python code only while the right mouse button is held? If the button becomes up, the code should interrupt immediately. I tried to use the pynput library but the pressed ...
User's user avatar
  • 96
0 votes
0 answers
139 views

I used the keyboard listener from the pynput.keyboard library and when I import it to my project: it works. When I run it to PyInstaller it gives me an error like this: Traceback (most recent call ...
Beronicous's user avatar
0 votes
1 answer
70 views

I'm trying to make a sort of nethack inspired type game and I'm trying to figure out the moving up and down(I know the current code is probably terribly inefficient)(also sorry if this question is ...
Donté Stewart's user avatar
0 votes
1 answer
147 views

I am currently making a terminal app, and wanted to allow user to change zoom of a windows 11 terminal. Is there a way to change Font size or any other way? As I didn't find anything to do it, and I ...
Stardaz's user avatar
  • 15
0 votes
1 answer
87 views

I'm trying to make an app that send keyboard commands to my computer. I have a server running on my computer that receives messages from the app and simulate keystrokes. The problem is that the ...
Matheus Lima's user avatar
0 votes
0 answers
35 views

I am using a library called pynput for scanning the keyboard input in real time. I store each character in a list, compress it to a string and detect patterns. The issue lies in deletion. The scanning ...
Suszzz's user avatar
  • 1
0 votes
1 answer
834 views

On MacOS I'm using the Raycast application launcher which lets you write command scripts to be executed from the raycast menu or a shortcut key. I wrote a short python script to send simple keyboard ...
PunchParty's user avatar
0 votes
0 answers
45 views

I want to check the keyboard input cursor position [x, y] but I can only get the mouse cursor position, that means you have to mouse-click into the field position to get the cursor position. Is there ...
fmatz's user avatar
  • 19
0 votes
2 answers
59 views

i have been working on a program that detects the number of times "enter" has been pressed, the problem is that the elif/if condition that is supposed to break the function when the variable ...
Iv102's user avatar
  • 11
0 votes
0 answers
45 views

i am working on a project where it detects where if you press "(" it closes it automatically the same thing for "[" and "{" but the point is it detects the keyboard ...
ريان الجزيري's user avatar
-1 votes
1 answer
201 views

Is there a way in Pynput to test if ctrl, shift or alt are pressed in the òn_pressed or on_release handler?
fmatz's user avatar
  • 19
0 votes
0 answers
61 views

So I have a Python script which I have been working on for some time and I am coming across a small issue and I can't seem to figure it out. So for a small debrief, this basically what the ...
DevSem's user avatar
  • 153
0 votes
1 answer
66 views

I have tried some solutions that I could get from the other threads here but still no luck. My issue is that the program can recognize the character I've entered but does not execute to stop the ...
bryxjam's user avatar
1 vote
0 answers
124 views

I'm trying to catch keystrokes in a python script, but it ONLY catches modifier keys (ctrl, cmd, alt) and not ordinary alphanumerical keys. Running on Mac Sonoma 14.1.1, Python 3.10.6. from pynput....
Hampus Brynolf's user avatar
1 vote
1 answer
165 views

I have a hotkey set up with pynput: hotkey = keyboard.HotKey( keyboard.HotKey.parse('<alt>+b'), on_activate=on_activate ) # Function to handle canonical form for key events def ...
No Name's user avatar
  • 282
0 votes
1 answer
34 views

i dont know how do i make it if ex. x axis is 254 and y axis is 254 it should only type one r and not spam r, i really dont know how i can fix it , someone please help import pygame import time import ...
xXOVKLXx's user avatar
1 vote
1 answer
52 views

Let's say I want a python program to bind to Shift+f. If you open up notepad and in there press Shift+f, then a capital F will appear. This means notepad received the keypresses. If you instead press ...
No Name's user avatar
  • 282
0 votes
0 answers
86 views

I work with Anaconda and Spyder. I have a Python code that does some web scraping, and it worked fine until I updated Anaconda and Spyder a few days ago. I'm having trouble with simulating writing or ...
Carlos Mario's user avatar
0 votes
0 answers
229 views

I'm on Ubuntu 24, using Python 3.12. I have a basic Python script with pynput that stops the program execution when the up arrow is pressed. Running this script in Pycharm has no problems, but in a ...
mm4096's user avatar
  • 171
1 vote
2 answers
305 views

I'm trying to use the pynput library to listen for hotkeys and start a thread when the F12 key is pressed. The thread prints a message in an infinite loop to the console. Pressing ESC should stop the ...
Collaxd's user avatar
  • 585
0 votes
0 answers
107 views

When I'm using the mouse.move() function with the Pynput package, the mouse does not stop moving when it reaches the edge of the screen. For example with the following code: from pynput.mouse import ...
gna's user avatar
  • 11
2 votes
4 answers
1k views

I know that PyAutoGUI and Pynput can read mouse inputs, but they can only read your coordinates on the screen. I'm trying to create a macro recorder but I need to be able to read the input being ...
user avatar
1 vote
0 answers
97 views

I am trying to create a windows service using python that monitors mouse movement and keyboard presses. The code works fine when ran in the console however when I modified it to turn it into a service,...
Maimun Ahmed's user avatar
0 votes
2 answers
63 views

#! /usr/bin/env python3 # -*- coding: utf-8 -*- # GUI module generated by PAGE version 8.0 # in conjunction with Tcl version 8.6 # Apr 23, 2024 11:05:03 PM CEST platform: Windows NT import sys ...
Francis Dusselier's user avatar
0 votes
1 answer
67 views

So I want to detect certain keys being pressed and stop those keys being sent to the foreground app. I don't want to use hideous libraries like pywin32 and pyHook as they are such a headache to build. ...
willwade's user avatar
  • 2,250
0 votes
0 answers
38 views

I have a script that uses the pynput library to perform a series of mouse and keyboard actions. The script highlights certain areas on the screen, copies the highlighted content, and saves it to ...
鈴木悠真's user avatar
0 votes
0 answers
34 views

im writing a program that writes a program (my coding skill sucks dont worry about it) and when i run this line: keyboard.press(Key.enter) it doesnt work at all (its also not returning any errors so ...
codingpersonorsomething's user avatar
0 votes
0 answers
304 views

i am trying to simulate keyboard input using pynput.keyboard Controller for example, here is a function that is supposed to minimize all windows from pynput.keyboard import Controller as ...
iwba's user avatar
  • 1
1 vote
0 answers
162 views

I am using the following code to read keyboard events using pynput and publish a suitable msg in ROS2. import rclpy from my_interfaces.msg import Chassis import threading import time from pynput ...
Somil Agrawal's user avatar

1
2 3 4 5
14