Demo updates, readme update

This commit is contained in:
MikeTheWatchGuy 2018-08-29 10:28:03 -04:00
parent bf4b9ffc0c
commit 292ba9754e
5 changed files with 264 additions and 36 deletions

View file

@ -12,11 +12,13 @@ with sg.FlexForm("Keyboard Test", return_keyboard_events=True, use_default_focus
form.Layout(layout)
# ---===--- Loop taking in user input --- #
while True:
button, value = form.ReadNonBlocking()
button, value = form.Read()
if button == "OK" or (button is None and value is None):
print(button, "exiting")
break
if len(button) == 1:
text_elem.Update(new_value='%s - %s'%(button, ord(button)))
if button is not None:
text_elem.Update(button)