diff options
authorWilliam Holland <>2015-06-07 14:26:01 +0100
committerWilliam Holland <>2015-06-07 14:26:01 +0100
commit22ef7890f374a84c9f6efab5060f8d5dfed735f0 (patch)
parent5b1b7ee0e8ff40c666cb1fe46472276ceecceacd (diff)
Update READMEHEADmaster
1 files changed, 42 insertions, 3 deletions
diff --git a/README b/README
index 1b6e647..561d869 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
-Keyboard-python is a simple module for parsing keyboard input.
-It is useful because it can tell you keypresses without the need
-for the Enter key to be pressed and can parse the following:
+Keyboard-python is a simple module for parsing keyboard input. It is useful
+because it can tell you keypresses without the need for the Enter key to be
+pressed and can parse the following:
@@ -14,6 +14,45 @@ Escape
Alt modified keys
Ctrl modified keys
+ Key(name)
+ Takes a string name.
+ KeyCombination(*keys):
+ Takes either instances of Key or strings which are given to new Key
+ instances as a name. If given only one Key it is considered
+ equivelent to that Key, e.g. KeyCombination('j') == Key('j') is true
+ contains_key(key):
+ return boolean determined by whether key is in the combination of
+ self
+ add_key(key):
+ add copy of key to the combination of self
+ add_keyCombination(instance_of_KeyCombination):
+ for each key in the instance given as an argument, add that key to
+ self
+ remove_key(key):
+ if the combination includes a key which shares a name with the key
+ given to the function then remove it from the combination
+ diff(instance_of_KeyCombination):
+ return a list of copies of keys that appear in exactly one of self
+ and the argument given
+ getkey(fd)
+ waits for keypress and returns returns KeyCombination containing all
+ keys pressed.
+ queue_keypresses(q,signal,fd)
+ takes a Queue q, a mutable with boolean value signal. While signal is
+ true it listens for keypresses putting them in q.
import sys