Skip to content
Snippets Groups Projects
Commit 717957e3 authored by Mark Tearle's avatar Mark Tearle
Browse files

Add keystroke handler (start therof)

parent 5786dab3
No related merge requests found
......@@ -20,6 +20,12 @@ class VirtualSnack(npyscreen.Form):
self.date_widget = self.add(npyscreen.FixedText, value=datetime.now(), editable=False)
self.date_widget.value = "Hello"
self.add_handlers({"^T": self.exit_application})
def exit_application(self,name):
self.parentApp.setNextForm(None)
self.editing = False
class VirtualSnackApp(npyscreen.NPSAppManaged):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment