diff options
author | hut <hut@lepus.uberspace.de> | 2015-09-20 04:46:20 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-09-20 04:47:44 +0200 |
commit | 2bf1362a087bc4043d838264657d5ac7755d74bc (patch) | |
tree | 91df3be52c079d61a873dede6b100250bd69d3df | |
parent | 46596ed96b245ca9d65d5008b25505216b6338a3 (diff) | |
download | ranger-2bf1362a087bc4043d838264657d5ac7755d74bc.tar.gz |
doc/tools/print_keys.py: print mouse events too
-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) |