summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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!"