diff options
author | hut <hut@lepus.uberspace.de> | 2015-09-20 04:46:20 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-10-04 01:32:49 +0200 |
commit | c75bc573002843a28a3d737a8b78b0e84a6b20d7 (patch) | |
tree | 948b78daf426eca32590a590a0e601c23485d476 /doc/tools | |
parent | 0e6bc965703a4fe7a68f5fe8f4addc21c75335ff (diff) | |
download | ranger-c75bc573002843a28a3d737a8b78b0e84a6b20d7.tar.gz |
doc/tools/print_keys.py: print mouse events too
Diffstat (limited to 'doc/tools')
-rwxr-xr-x | doc/tools/print_keys.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/tools/print_keys.py b/doc/tools/print_keys.py index 17d2513b..fecd6fb9 100755 --- a/doc/tools/print_keys.py +++ b/doc/tools/print_keys.py @@ -9,6 +9,12 @@ sep = '; ' @wrapper def main(w): + mousemask(ALL_MOUSE_EVENTS) + mouseinterval(0) while True: - w.addstr(str(w.getch()) + sep) + ch = w.getch() + if ch == KEY_MOUSE: + w.addstr(repr(getmouse()) + sep) + else: + w.addstr(str(ch) + sep) |