From 6140fb75724c467cb2f4fa28d526008b3b058230 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Tue, 6 Oct 2026 09:36:19 +0100 Subject: [PATCH] :lipstick: Add some missing keyboard hints to file dialogs --- src/rogallo/screens/main/screen.py | 1 + src/rogallo/widgets/side_panel/client_certificates.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/rogallo/screens/main/screen.py b/src/rogallo/screens/main/screen.py index bd047007..1dc7a0c6 100644 --- a/src/rogallo/screens/main/screen.py +++ b/src/rogallo/screens/main/screen.py @@ -615,6 +615,7 @@ async def download_uri(self, message: DownloadURI) -> None: title=f"Download {location}", default_file=Path(location.path).name, save_button="Download", + cancel_button=partial(add_key, key="Esc", context=self), ) ) ): diff --git a/src/rogallo/widgets/side_panel/client_certificates.py b/src/rogallo/widgets/side_panel/client_certificates.py index ffba5b71..54e17e68 100644 --- a/src/rogallo/widgets/side_panel/client_certificates.py +++ b/src/rogallo/widgets/side_panel/client_certificates.py @@ -2,6 +2,7 @@ ############################################################################## # Python imports. +from functools import partial from itertools import chain from typing import Final @@ -16,6 +17,7 @@ # Textual enhanced imports. from textual_enhanced.binding import HelpfulBinding from textual_enhanced.dialogs import Confirm, ModalInput +from textual_enhanced.tools import add_key from textual_enhanced.widgets import EnhancedOptionList ############################################################################## @@ -403,6 +405,7 @@ async def action_export(self) -> None: else "certificate.pem", filters=_FILE_FILTERS, save_button="Export", + cancel_button=partial(add_key, key="Esc", context=self), ) ) ) @@ -428,6 +431,7 @@ async def action_import(self) -> None: filters=_FILE_FILTERS, open_button="Import", title="Import Certificate", + cancel_button=partial(add_key, key="Esc", context=self), ) ): try: