GithubHelp home page GithubHelp logo

g318 / pyhook_py3k Goto Github PK

View Code? Open in Web Editor NEW

This project forked from answeror/pyhook_py3k

0.0 0.0 0.0 130 KB

A Python3 fork of pyHook (a python wrapper for global input hooks in Windows), fixed some bugs and compatible with cx-freeze.

License: MIT License

Python 100.00%

pyhook_py3k's Introduction

Python3 fork of pyHook

Introduction

Copy from official site:

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. The pyHook package provides callbacks for global mouse and keyboard events in Windows. Python applications register can event handlers for user input events such as left mouse down, left mouse up, key down, etc. and set the keyboard and/or mouse hook. The underlying C library reports information like the time of the event, the name of the window in which the event occurred, the value of the event, any keyboard modifiers, etc. Events can be logged and/or filtered.

Install

Build with MSVC9

Make sure you are under "Visual Studio 2008 Command Prompt".

python setup.py build_ext --swig=path-to-swig.exe
pip install .

About this fork

Unicode

Fixed unicode decoding bug of window title. This bug may cause crashing on exit randomly. Usually with console output:

TypeError: MouseSwitch() takes exactly 9 arguments (1 given)

or

TypeError: KeyboardSwitch() takes exactly 9 arguments (1 given)

Freezing

Original pyHook will cause "cannot find _cpyHook module" error when using PyInstaller or cx-freeze to freeze python app. You need manually rename pyHook._cpyHook to _cpyHook. Now it's compatible with cx-freeze.

pyhook_py3k's People

Contributors

answeror avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.