pyHook is a python wrapper for global input hooks in Windows. Specifically it wraps the Windows SetWindowsHookEx API function using low-level keyboard (WH_KEYBOARD_LL) and mouse (WH_MOUSE_LL) hooks.
Questions tagged [pyhook]
202 questions
0
votes
1 answer
how to install pyhook for python3.4
I tried to install Pyhook using .whl files from
lfd.uci.edu/~gohlke/pythonlibs
I also tried to install it through pip install pyhook
and is show me this :
Could not find any downloads that satisfy the requirement pyhook
Cleaning up...
No…

Chris
- 17
- 6
0
votes
1 answer
Check if mouse up or mouse down with pyHook?
I'm trying to detect whether or not the left moues button is down or up with pyHook. What I currently have is:
def OnDown():
toggle = True
def OnUp()
toggle = False
hm = pyHook.HookManager()
hm.HookMouse()
hm.MouseLeftDown =…

Max Fieschko
- 37
- 5
0
votes
2 answers
proper version of pyhook installed but fails to run the code
I am using python 2.7.13 32 bit, have installed 'pyHook-1.5.1-cp27-cp27m-win32.whl' proper version pyhook.
I am running this below code:
import pyhook
def fun():
print "Do something"
#create pyhk class instance
hot = pyhk.pyhk()
#add…

Jake
- 65
- 2
- 14
0
votes
0 answers
crawling web using python and selenium tools
while importing the selenium library I am getting error, at following line of cod
from selenium import webdriver
I am seeing following error:
No module named 'selenium
I have installed selenium using following command
pip install…

Oppir
- 19
- 3
0
votes
0 answers
Python stops registering mouse inputs?
I have this code here. I coded this "bot" in order to increase mouse clicks. I've only one issue, python stops registering mouse inputs during that time.sleep (marked with #issue). When I set it to 20/30 ms I can barely notice it, but whenver I try…

Beter
- 314
- 4
- 20
0
votes
0 answers
PyHook Keboard inputs are read incorrectly
i was working on a project on python and it involves keyboard hooking with pyhook.I'm trying to get keyboard inputs.But unfortunately the inputs recieved is wrong somtimes.The following are the test code and the output i got from them.The problem…

Sreyas
- 461
- 3
- 15
0
votes
1 answer
How to bind multiple keys to different functions using pyHook in Python?
I'm trying to get my program to execute two functions called "pauseinit" and "startinit" using different keypresses that can be detected even when a python GUI isn't the focus.
My code reads:
class Keystroke_Watcher(object):
def __init__(self):
…

Max Fieschko
- 37
- 5
0
votes
1 answer
Tkinter window won't get focus because of pyHook mouse LeftDown function
so I'm trying to open a tkinter window through sensing left clicks from the mouse using pyHook, and I want the newly opened window to get the focus. The problem is that no matter what focus method I try, the current window will always retain the…

Ali Alkhelaifi
- 1
- 1
0
votes
1 answer
Pyhook gives me weird outputs for some reason
So I'm new to Pyhook and wanted to make myself a keylogger for educational purposes. However, the log gives me weird inputs. It's either just random symbols, always in capital or all good and normal.
I'm using python 3.4 and I'm on Windows.
This is…

Lojas
- 195
- 3
- 13
0
votes
0 answers
Python - WindowName for Compare with List
I am currently blocked on a point of a program in Python.
I wish to compare in a list, the WindowName event to launch directives.
Example:
import win32api
import pyHook
liste = ["Google", "Task"]
if event.WindowName == liste:
Screenshot ()
…

Leiro
- 1
- 2
0
votes
4 answers
Q: Install pyHook with pip for Python 2.7 on Windows
My computer runs on Windows 7 (x64) and I installed Anaconda 2 and Anaconda 3 both in 32 bit version, to be able to use Python 2.7 or 3.5 depending on my projects. I'm trying to install pyHook for Python 2.7 and I'm struggling.
I tried with pip and…

Ru3di
- 1
- 1
- 1
- 4
0
votes
0 answers
getting date issue in making keylogger
I'm making a key logger with python it is done but i want to name the file with date and time name because it will be easy to read like this but it gives me this error :
Traceback (most recent call last):
File…

Omar Wael
- 19
- 1
- 5
0
votes
4 answers
No attribute 'HookManager'
I am copying the key logger from this video: (https://www.youtube.com/watch?v=8BiOPBsXh0g) and running the code:
import pyHook, sys, logging, pythoncom
file_log = 'C:\Users\User\Google Drive\Python'
def OnKeyboardEvent(event):
…

Crelic
- 1
- 4
0
votes
1 answer
Why, using pyHook, the timestamp (event.Time) of the events is wrong?
This is the code that I used to debug the events:
print("Real timestamp:", int(time()))
print("Event Timestamp:", event.Time)
print("Event Time:", strftime("%H:%M:%S %z", localtime(event.Time)))
And this is the output I got:
Real timestamp:…

butterfly
- 47
- 7
0
votes
1 answer
Tkinter text entry with pyHook hangs GUI window
I have a Tkinter GUI application that I need to enter text in. I cannot assume that the application will have focus, so I implemented pyHook, keylogger-style.
When the GUI window does not have focus, text entry works just fine and the StringVar…

heidi
- 655
- 6
- 20