File tree 3 files changed +689
-0
lines changed
3 files changed +689
-0
lines changed Original file line number Diff line number Diff line change
1
+ =PYHK
2
+
3
+ PYHK is python module that allows for simple hotkey registration in any program.
4
+ It extends pyhook to have normal hotkey functionality like autohotkey (AHK) scripts.
5
+
6
+ Main features:
7
+ * Simple hotkey registration
8
+ * Hotkey removal by hotkey or id
9
+ * Option to run trigger function in thread
10
+ * Option to run trigger function on a key up event
11
+
12
+ Tested with Python 2.6, 2.7
13
+
14
+ Total downloads before moving to github: 2562
15
+
16
+ PYHK is as simple as this:
17
+
18
+ ``` python
19
+ import pyhk
20
+
21
+ def fun ():
22
+ print " Do something"
23
+
24
+ # create pyhk class instance
25
+ hot = pyhk.pyhk()
26
+
27
+ # add hotkey
28
+ hot.addHotkey([' Ctrl' , ' Alt' ,' 7' ],fun)
29
+
30
+ # start looking for hotkey.
31
+ hot.start()
32
+ ```
33
+
34
+ ==Documentation
35
+ http://www.schurpf.com/python/python-hotkey-module/pyhk-end-user-documentation/
36
+
37
+ ==Old version
38
+ http://www.schurpf.com/python/python-hotkey-module/#download
39
+
40
+ ==Dependencies
41
+ [ Pyhook] ( http://sourceforge.net/apps/mediawiki/pyhook/index.php?title=Main_Page )
42
+
43
+ ==Links
44
+
45
+ http://www.schurpf.com/python/python-hotkey-module/ - Project home page
46
+ http://www.schurpf.com/python/python-hotkey-module/pyhk-end-user-documentation/ - End user documentation
47
+
48
+ ==Contact Author
49
+
50
+ michael at schurpf dot com
51
+ Please write in English or German only.
52
+
53
+ ==Known Issues
54
+
55
+ Python IDLE freezes at times. Best use is to call your script directly from the command line with python YOURSCRIPT.py.
56
+
57
+ After logout or sleep on some machines the hotkeys get triggered by only pressing the modifiers.
58
+
59
+ ==License
60
+
61
+ Distributed under GNU General Public License version 2.
You can’t perform that action at this time.
0 commit comments