about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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)