getkey.py allow for easy viewing of special keys
This commit is contained in:
parent
82bbfc0922
commit
222fdb83aa
2 changed files with 14 additions and 0 deletions
13
getkey.py
Executable file
13
getkey.py
Executable 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
1
nboard
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue