blob: e1cea81ec17f0aa437a275d8cd54828486f88c74 (
plain) (
tree)
|
|
#!/usr/bin/env python
"""
You can use this tool to find out values of keypresses
"""
from curses import *
sep = '; '
@wrapper
def main(w):
mousemask(ALL_MOUSE_EVENTS)
mouseinterval(0)
while True:
ch = w.getch()
if ch == KEY_MOUSE:
w.addstr(repr(getmouse()) + sep)
else:
w.addstr(str(ch) + sep)
|