dispatch kehy

This commit is contained in:
Will McGugan
2022-02-07 12:00:36 +00:00
parent 8ad03e2216
commit c74c069629
6 changed files with 9 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
from textual.app import App
from textual import events
from textual.widgets import Placeholder
from textual.widget import Widget
from textual import events
class BasicApp(App):
@@ -16,6 +16,9 @@ class BasicApp(App):
sidebar=Widget(),
)
async def on_key(self, event: events.Key) -> None:
await self.dispatch_key(event)
def key_a(self) -> None:
self.query("#footer").set_styles(text="on magenta")