Tell the user when Accessibility is missing

Without it the Shift-Shift gestures fail silently, so hiding the panel
left no way to bring it back and the app looked broken. The app now says
so on launch and points at Cmd+Shift+Space, which needs no permission,
and --diag reports the permission state alongside the status item's
placement so a lockout can be diagnosed instead of guessed at.
This commit is contained in:
2026-10-08 10:45:50 +08:00
parent 962c205d1d
commit 90890186c0
4 changed files with 78 additions and 8 deletions
+7 -2
View File
@@ -87,8 +87,13 @@ struct PanelView: View {
HStack(spacing: 8) {
Image(systemName: "exclamationmark.triangle.fill")
.foregroundStyle(.yellow)
Text("Shift-tap capture needs Accessibility access.")
.font(.caption)
VStack(alignment: .leading, spacing: 2) {
Text("Shift-tap capture needs Accessibility access.")
.font(.caption)
Text("Meanwhile: Cmd+Shift+Space toggles this panel.")
.font(.caption2)
.foregroundStyle(.secondary)
}
Spacer()
Button("Grant…") {
let options = [kAXTrustedCheckOptionPrompt.takeUnretainedValue(): true] as CFDictionary