summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Holland <william.holland@codethink.co.uk>2015-05-29 00:44:09 +0100
committerWilliam Holland <william.holland@codethink.co.uk>2015-05-29 00:44:09 +0100
commit0ba924f2c0b8d0b3b1ddd2bc887adf06145d41df (patch)
treef9813e927883e1fecdd7cb40cb85fcb5a4d399f4
parent4478cee575a8d637489238466f86b6792a16ae3f (diff)
downloadkeyboard-python-0ba924f2c0b8d0b3b1ddd2bc887adf06145d41df.tar.bz2
Update README
to reflect the addition of set_to_read_key and reset_tty
-rw-r--r--README6
1 files changed, 5 insertions, 1 deletions
diff --git a/README b/README
index 0e74ee4..b1e8a84 100644
--- a/README
+++ b/README
@@ -16,12 +16,16 @@ Ctrl modified keys
Example:
+ import sys
from keyboardpython import key, getkey
alt_A = key.Key('A',key.ALT)
alt_a = key.Key('a',key.ALT)
- k = getkey()
+ fd = sys.stdin.fileno()
+ set_to_read_key(fd)
+ k = getkey(fd)
+ reset_tty(fd)
if k == alt_A:
print "You pressed Alt+A!"