From 19abfbb98c5a0a004ece7d1b41ad1a110993d98e Mon Sep 17 00:00:00 2001 From: xfnw Date: Thu, 23 Jul 2020 20:12:12 +0000 Subject: [PATCH] Revert "allow all single-length charactors" This reverts commit 366a5f96cc7e3ae3eaf942bea8a752d8c858430a. --- nboard | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nboard b/nboard index fad5c0f..f4660bf 100755 --- a/nboard +++ b/nboard @@ -5,6 +5,7 @@ import curses,time,json,sys dataPath = '/home/lickthecheese/nboard/nboard.json' +allowedChars = "█▒░ `~1234567890-=!@#$%^&*()_+qwertyuiop[]\\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:\"zxcvbnm,./ZXCVBNM<>?" data = {} def main(stdscr): @@ -63,7 +64,7 @@ def main(stdscr): data = json.load(openfile) # if valid key pressed, write it - if len(k) == 1: + if k in allowedChars: data[str((ty,tx))] = k vx = vx+1 with open(dataPath, 'w') as outfile: