getkey.py allow for easy viewing of special keys

This commit is contained in:
vulpine 2020-07-24 15:56:26 +00:00
parent 82bbfc0922
commit 222fdb83aa
2 changed files with 14 additions and 0 deletions

13
getkey.py Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env python3
import curses
def main(stdscr):
while True:
k = stdscr.getkey()
print(repr(k))
curses.wrapper(main)

1
nboard
View File

@ -67,6 +67,7 @@ def main(stdscr):
if k in allowedChars:
data[str((ty,tx))] = k
vx = vx+1
time.sleep(0)
with open(dataPath, 'w') as outfile:
json.dump(data, outfile)
tx = cx + (vx) - width // 2