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