nboard/getkey.py

21 lines
261 B
Python
Raw Normal View History

#!/usr/bin/env python3
import curses
def main(stdscr):
while True:
k = stdscr.getkey()
2020-07-24 17:13:53 +00:00
if k == '\x1b':
k=""
for i in range(5):
k += stdscr.getkey()
print(repr(k))
curses.wrapper(main)