This commit is contained in:
Will McGugan
2021-07-17 09:09:12 +01:00
parent 80e1a140c4
commit 320d6486d3
7 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
from textual.app import App
class Beeper(App):
async def on_key(self, event):
self.console.bell()
Beeper.run()

View File

@@ -0,0 +1,10 @@
from textual.app import App
from textual import events
class Beeper(App):
async def on_key(self, event: events.Key) -> None:
self.console.bell()
Beeper.run()

View File

@@ -0,0 +1,10 @@
from textual.app import App
class ColorChanger(App):
async def on_key(self, event):
if event.key.isdigit():
self.background = f"on color({event.key})"
ColorChanger.run()