about summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-09-20 04:46:20 +0200
committerhut <hut@lepus.uberspace.de>2015-09-20 04:47:44 +0200
commit2bf1362a087bc4043d838264657d5ac7755d74bc (patch)
tree91df3be52c079d61a873dede6b100250bd69d3df /doc
parent46596ed96b245ca9d65d5008b25505216b6338a3 (diff)
downloadranger-2bf1362a087bc4043d838264657d5ac7755d74bc.tar.gz
doc/tools/print_keys.py: print mouse events too
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/tools/print_keys.py8
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)