Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UCC
virtualsnack
Commits
717957e3
Commit
717957e3
authored
Oct 12, 2014
by
Mark Tearle
Browse files
Add keystroke handler (start therof)
parent
5786dab3
Changes
1
Hide whitespace changes
Inline
Side-by-side
virtualsnack.py
View file @
717957e3
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment