Adding ESC key press action.

This commit is contained in:
2020-01-05 09:53:16 +01:00
parent ed16384063
commit b5e77d3996
5 changed files with 20 additions and 1 deletions

View File

@@ -12,6 +12,9 @@ class View:
self.vdom = h('div', {}, "Loading...")
self.model = None
patch(container, self.vdom)
# this does not work on parent div, so attaching to document here
document.addEventListener("keyup", msg(KeyboardPress()))
def view(self, model):
self.model = model