Refactor keybindings: update visibility of key bindings for improved usability and consistency in the hosts manager application.

This commit is contained in:
Philip Henning 2025-08-16 21:56:46 +02:00
parent c941a4ba24
commit 49dd015d53

View file

@ -9,13 +9,13 @@ from textual.binding import Binding
# Key bindings for the hosts manager application # Key bindings for the hosts manager application
HOSTS_MANAGER_BINDINGS = [ HOSTS_MANAGER_BINDINGS = [
Binding("q", "quit", "Quit", show=False), Binding("q", "quit", "Quit", show=True, id="right:quit"),
Binding("r", "reload", "Reload hosts file", show=False), Binding("r", "reload", "Reload hosts file", show=True, id="right:reload"),
Binding("question_mark", "help", "Show help", True, key_display="?", show=False), Binding("question_mark", "help", "Show help", show=True, key_display="?", id="right:help"),
Binding("i", "sort_by_ip", "Sort by IP address", show=False), Binding("i", "sort_by_ip", "Sort by IP address", show=True, id="left:quit"),
Binding("n", "sort_by_hostname", "Sort by hostname", show=False), Binding("n", "sort_by_hostname", "Sort by hostname", show=True, id="left:quit"),
Binding("c", "config", "Configuration", show=False), Binding("c", "config", "Configuration", show=True),
Binding("ctrl+e", "toggle_edit_mode", "Toggle edit mode", show=False), Binding("ctrl+e", "toggle_edit_mode", "Toggle edit mode", show=True),
Binding("a", "add_entry", "Add new entry", show=False), Binding("a", "add_entry", "Add new entry", show=False),
Binding("d", "delete_entry", "Delete entry", show=False), Binding("d", "delete_entry", "Delete entry", show=False),
Binding("e", "edit_entry", "Edit entry", show=False), Binding("e", "edit_entry", "Edit entry", show=False),