Git Product home page Git Product logo

pyhk's Introduction

#PYHK

PYHK is python module that allows for simple hotkey registration in any program. It extends pyhook to have normal hotkey functionality like autohotkey (AHK) scripts.

Main features:

  • Simple hotkey registration
  • Hotkey removal by hotkey or id
  • Option to run trigger function in thread
  • Option to run trigger function on a key up event

Tested with Python 2.6, 2.7

Total downloads before moving to github: 2562

PYHK is as simple as this:

import pyhk
 
def fun():
    print "Do something"
 
#create pyhk class instance
hot = pyhk.pyhk()
 
#add hotkey
hot.addHotkey(['Ctrl', 'Alt','7'],fun)
 
#start looking for hotkey.
hot.start()

##Documentation http://www.schurpf.com/python/python-hotkey-module/pyhk-end-user-documentation/

##Old version http://www.schurpf.com/python/python-hotkey-module/#download

##Dependencies Pyhook

##Links

http://www.schurpf.com/python/python-hotkey-module/ - Project home page http://www.schurpf.com/python/python-hotkey-module/pyhk-end-user-documentation/ - End user documentation

##Contact Author

michael at schurpf dot com Please write in English or German only.

##Known Issues

Python IDLE freezes at times. Best use is to call your script directly from the command line with python YOURSCRIPT.py.

After logout or sleep on some machines the hotkeys get triggered by only pressing the modifiers.

##Alternatives

https://github.com/IronManMark20/hooked

##License

Distributed under GNU General Public License version 2.

pyhk's People

Contributors

schurpf avatar deanf avatar

Watchers

James Cloos avatar  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.