11using Gtk 4.0;
22using Adw 1;
33
4- template $KeyboardShortcutsDialog: Adw.Dialog {
5- Adw.ToastOverlay toast_overlay {
6- Adw.ToolbarView {
7- width-request: 680;
8- height-request: 250;
9- vexpand: false;
10- valign: start;
4+ Adw.ShortcutsDialog keyboard_shortcuts_dialog {
5+ width-request: 680;
6+ height-request: 380;
7+ Adw.ShortcutsSection {
8+ title: _("General");
119
12- [top]
13- Adw.HeaderBar {
14- [title]
15- Adw.WindowTitle { title: _("Keyboard Shortcuts"); }
16- }
17-
18- content: Adw.Clamp {
19- margin-top: 24;
20- margin-bottom: 24;
21- margin-start: 24;
22- margin-end: 24;
23- vexpand: false;
24- valign: start;
25-
26- Adw.PreferencesPage {
27- Adw.PreferencesGroup {
28- title: _("Global Shortcuts");
29- description: _("Application-wide keyboard shortcuts");
30-
31- Adw.ActionRow {
32- title: _("Open SSH Config File");
33- subtitle: _("Open a different SSH configuration file");
34- [suffix] Label { label: "Ctrl+O"; css-classes: ["keyboard-shortcut"]; }
35- }
36- Adw.ActionRow {
37- title: _("Save Configuration");
38- subtitle: _("Save current changes to SSH config");
39- [suffix] Label { label: "Ctrl+S"; css-classes: ["keyboard-shortcut"]; }
40- }
41- Adw.ActionRow {
42- title: _("Reload Configuration");
43- subtitle: _("Reload SSH config from disk");
44- [suffix] Label { label: "Ctrl+R"; css-classes: ["keyboard-shortcut"]; }
45- }
46- Adw.ActionRow {
47- title: _("Search");
48- subtitle: _("Focus the search bar");
49- [suffix] Label { label: "Ctrl+F"; css-classes: ["keyboard-shortcut"]; }
50- }
51- Adw.ActionRow {
52- title: _("Toggle Sidebar");
53- subtitle: _("Show or hide the host editor panel");
54- [suffix] Label { label: "F9"; css-classes: ["keyboard-shortcut"]; }
55- }
56- Adw.ActionRow {
57- title: _("Preferences");
58- subtitle: _("Open application preferences");
59- [suffix] Label { label: "Ctrl+,"; css-classes: ["keyboard-shortcut"]; }
60- }
61- Adw.ActionRow {
62- title: _("SSH Key Manager");
63- subtitle: _("Open SSH key management dialog");
64- [suffix] Label { label: "Ctrl+K"; css-classes: ["keyboard-shortcut"]; }
65- }
66- }
67-
68- Adw.PreferencesGroup {
69- title: _("Host Management");
70- description: _("Shortcuts for managing SSH hosts");
10+ Adw.ShortcutsItem { title: _("Open Menu"); accelerator: "F10"; }
11+ Adw.ShortcutsItem { title: _("Open SSH Config File"); accelerator: "<Ctrl>O"; }
12+ Adw.ShortcutsItem { title: _("Save Configuration"); accelerator: "<Ctrl>S"; }
13+ Adw.ShortcutsItem { title: _("Reload Configuration"); accelerator: "<Ctrl>R"; }
14+ Adw.ShortcutsItem { title: _("Search"); accelerator: "<Ctrl>F"; }
15+ Adw.ShortcutsItem { title: _("Toggle Sidebar"); accelerator: "F9"; }
16+ Adw.ShortcutsItem { title: _("Preferences"); accelerator: "<Ctrl>comma"; }
17+ Adw.ShortcutsItem { title: _("SSH Key Manager"); accelerator: "<Ctrl>K"; }
18+ }
7119
72- Adw.ActionRow {
73- title: _("Add New Host");
74- subtitle: _("Create a new SSH host configuration");
75- [suffix] Label { label: "Ctrl+N"; css-classes: ["keyboard-shortcut"]; }
76- }
77- Adw.ActionRow {
78- title: _("Duplicate Host");
79- subtitle: _("Create a copy of the selected host");
80- [suffix] Label { label: "Ctrl+D"; css-classes: ["keyboard-shortcut"]; }
81- }
82- Adw.ActionRow {
83- title: _("Delete Host");
84- subtitle: _("Remove the selected host");
85- [suffix] Label { label: "Ctrl+Delete"; css-classes: ["keyboard-shortcut"]; }
86- }
87- Adw.ActionRow {
88- title: _("Edit Host");
89- subtitle: _("Edit the selected host configuration");
90- [suffix] Label { label: "Enter, F2"; css-classes: ["keyboard-shortcut"]; }
91- }
92- }
20+ Adw.ShortcutsSection {
21+ title: _("Host Management");
9322
94- Adw.PreferencesGroup {
95- title: _("Navigation");
96- description: _("Shortcuts for navigating the interface");
23+ Adw.ShortcutsItem { title: _("Add New Host"); accelerator: "<Ctrl>N"; }
24+ Adw.ShortcutsItem { title: _("Duplicate Host"); accelerator: "<Ctrl>D"; }
25+ Adw.ShortcutsItem { title: _("Delete Host"); accelerator: "<Ctrl>Delete"; }
26+ Adw.ShortcutsItem { title: _("Edit Host"); accelerator: "Return"; }
27+ Adw.ShortcutsItem { title: _("Edit Host"); accelerator: "F2"; }
28+ }
9729
98- Adw.ActionRow {
99- title: _("Navigate Host List");
100- subtitle: _("Move up and down through hosts");
101- [suffix] Label { label: "↑, ↓"; css-classes: ["keyboard-shortcut"]; }
102- }
103- Adw.ActionRow {
104- title: _("Jump to First Host");
105- subtitle: _("Select the first host in the list");
106- [suffix] Label { label: "Home"; css-classes: ["keyboard-shortcut"]; }
107- }
108- Adw.ActionRow {
109- title: _("Jump to Last Host");
110- subtitle: _("Select the last host in the list");
111- [suffix] Label { label: "End"; css-classes: ["keyboard-shortcut"]; }
112- }
113- Adw.ActionRow {
114- title: _("Page Navigation");
115- subtitle: _("Navigate by 10 hosts at a time");
116- [suffix] Label { label: "Page Up, Page Down"; css-classes: ["keyboard-shortcut"]; }
117- }
118- Adw.ActionRow {
119- title: _("Form Navigation");
120- subtitle: _("Move between form fields");
121- [suffix] Label { label: "Tab, Shift+Tab"; css-classes: ["keyboard-shortcut"]; }
122- }
123- Adw.ActionRow {
124- title: _("Clear Focus");
125- subtitle: _("Remove focus from current field");
126- [suffix] Label { label: "Escape"; css-classes: ["keyboard-shortcut"]; }
127- }
128- }
30+ Adw.ShortcutsSection {
31+ title: _("Navigation");
32+
33+ Adw.ShortcutsItem { title: _("Move Selection Up"); accelerator: "Up"; }
34+ Adw.ShortcutsItem { title: _("Move Selection Down"); accelerator: "Down"; }
35+ Adw.ShortcutsItem { title: _("Jump to First Host"); accelerator: "Home"; }
36+ Adw.ShortcutsItem { title: _("Jump to Last Host"); accelerator: "End"; }
37+ Adw.ShortcutsItem { title: _("Page Up"); accelerator: "Page_Up"; }
38+ Adw.ShortcutsItem { title: _("Page Down"); accelerator: "Page_Down"; }
39+ Adw.ShortcutsItem { title: _("Next Field"); accelerator: "Tab"; }
40+ Adw.ShortcutsItem { title: _("Previous Field"); accelerator: "<Shift>Tab"; }
41+ Adw.ShortcutsItem { title: _("Clear Focus"); accelerator: "Escape"; }
42+ }
12943
130- Adw.PreferencesGroup {
131- title: _("Dialog Shortcuts");
132- description: _("Shortcuts available in dialogs");
44+ Adw.ShortcutsSection {
45+ title: _("Dialog Shortcuts");
13346
134- Adw.ActionRow {
135- title: _("Close Dialog");
136- subtitle: _("Close any open dialog");
137- [suffix] Label { label: "Escape"; css-classes: ["keyboard-shortcut"]; }
138- }
139- Adw.ActionRow {
140- title: _("Generate Key");
141- subtitle: _("Create new SSH key (in Key Manager)");
142- [suffix] Label { label: "Ctrl+N"; css-classes: ["keyboard-shortcut"]; }
143- }
144- Adw.ActionRow {
145- title: _("Import Key");
146- subtitle: _("Import existing SSH key (in Key Manager)");
147- [suffix] Label { label: "Ctrl+I"; css-classes: ["keyboard-shortcut"]; }
148- }
149- Adw.ActionRow {
150- title: _("Delete Key");
151- subtitle: _("Delete selected key (in Key Manager)");
152- [suffix] Label { label: "Delete"; css-classes: ["keyboard-shortcut"]; }
153- }
154- }
155- }
156- };
157- }
47+ Adw.ShortcutsItem { title: _("Close Dialog"); accelerator: "Escape"; }
48+ Adw.ShortcutsItem { title: _("Generate Key"); accelerator: "<Ctrl>N"; }
49+ Adw.ShortcutsItem { title: _("Import Key"); accelerator: "<Ctrl>I"; }
50+ Adw.ShortcutsItem { title: _("Delete Key"); accelerator: "Delete"; }
15851 }
15952}
0 commit comments