mirror of
https://github.com/1j01/textual-paint.git
synced 2025-01-02 20:04:36 +03:00
Exit with Ctrl+Q, in preparation for overriding Ctrl+C
This commit is contained in:
parent
3844667ff7
commit
e19cdff5e7
3
paint.py
3
paint.py
@ -268,6 +268,9 @@ class PaintApp(App):
|
||||
button_id = self.NAME_MAP.get(key)
|
||||
if button_id is not None:
|
||||
press(self.NAME_MAP.get(key, key))
|
||||
elif key == "ctrl+q" or key == "meta+q":
|
||||
self.exit()
|
||||
|
||||
|
||||
def on_button_pressed(self, event: Button.Pressed) -> None:
|
||||
"""Called when a button is pressed."""
|
||||
|
Loading…
Reference in New Issue
Block a user