From 222fdb83aa9ec0193f526129ceb6abd415e7a529 Mon Sep 17 00:00:00 2001 From: xfnw Date: Fri, 24 Jul 2020 15:56:26 +0000 Subject: [PATCH] getkey.py allow for easy viewing of special keys --- getkey.py | 13 +++++++++++++ nboard | 1 + 2 files changed, 14 insertions(+) create mode 100755 getkey.py diff --git a/getkey.py b/getkey.py new file mode 100755 index 0000000..2a48bf9 --- /dev/null +++ b/getkey.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 +import curses + +def main(stdscr): + while True: + k = stdscr.getkey() + print(repr(k)) + + + +curses.wrapper(main) + + diff --git a/nboard b/nboard index c105621..884165f 100755 --- a/nboard +++ b/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