Skip to content

Commit

Permalink
chore: improve ux in keybind recording view
Browse files Browse the repository at this point in the history
closes #360
  • Loading branch information
ejbills committed Dec 22, 2024
1 parent 75adec7 commit 5730d47
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
23 changes: 23 additions & 0 deletions DockDoor/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,9 @@
}
}
}
},
"1. Select \"Command (⌘)\" as the initialization key." : {

},
"1/%lldx" : {
"localizations" : {
Expand Down Expand Up @@ -1072,6 +1075,15 @@
}
}
}
},
"2. Click \"Start Recording Trigger Key\"." : {

},
"3. Press ONLY the Tab key (not Command+Tab)." : {

},
"4. Your keybind will be set to Command+Tab." : {

},
"Accessibility" : {
"localizations" : {
Expand Down Expand Up @@ -9306,6 +9318,9 @@
}
}
}
},
"Example:" : {

},
"Exclude windows from capture by filtering specific text in their titles" : {

Expand Down Expand Up @@ -12709,6 +12724,9 @@
}
}
}
},
"Important: When recording, press ONLY the trigger key (e.g. just press Tab if you want command + Tab). Do not press the initialization key during recording." : {

},
"Include Hidden and Minimized Windows in the Window Switcher" : {
"localizations" : {
Expand Down Expand Up @@ -18439,6 +18457,7 @@
}
},
"Press any key to set the keybind." : {
"extractionState" : "stale",
"localizations" : {
"af" : {
"stringUnit" : {
Expand Down Expand Up @@ -26473,6 +26492,7 @@
}
},
"Start recording keybind" : {
"extractionState" : "stale",
"localizations" : {
"af" : {
"stringUnit" : {
Expand Down Expand Up @@ -26828,6 +26848,9 @@
}
}
}
},
"Start recording trigger key" : {

},
"Subatomic" : {
"comment" : "Window size option",
Expand Down
27 changes: 25 additions & 2 deletions DockDoor/Views/Settings/WindowSwitcherSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ struct WindowSwitcherSettingsView: View {
.scaledToFit()
.layoutPriority(1)

Text("Press any key to set the keybind.")
Text("Important: When recording, press ONLY the trigger key (e.g. just press Tab if you want command + Tab). Do not press the initialization key during recording.")
.font(.subheadline)
.foregroundColor(.secondary)

Button(action: { viewModel.isRecording.toggle() }) {
Text(viewModel.isRecording ? "Press any key..." : "Start recording keybind")
Text(viewModel.isRecording ? String(localized: "Press any key...") : String(localized: "Start recording trigger key"))
}
.keyboardShortcut(.defaultAction)

Expand All @@ -65,6 +65,29 @@ struct WindowSwitcherSettingsView: View {
.font(.subheadline)
.padding(.top, 5)
}

Divider()

VStack(alignment: .leading, spacing: 4) {
Text("Example:")
.font(.body)

Text("1. Select \"Command (⌘)\" as the initialization key.")
.font(.subheadline)
.foregroundColor(.secondary)

Text("2. Click \"Start Recording Trigger Key\".")
.font(.subheadline)
.foregroundColor(.secondary)

Text("3. Press ONLY the Tab key (not Command+Tab).")
.font(.subheadline)
.foregroundColor(.secondary)

Text("4. Your keybind will be set to Command+Tab.")
.font(.subheadline)
.foregroundColor(.secondary)
}
}
}
.padding(20)
Expand Down

0 comments on commit 5730d47

Please sign in to comment.