diff --git a/CHANGELOG.md b/CHANGELOG.md index fc7abbb8f..c3aaeb5d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Tab and Shift-Tab move focus out of the AI rules text field in the connection form instead of inserting a tab character. (#1490) - The cell inspector's Set NULL, Set DEFAULT, copy, and SQL-function actions are now in a right-click context menu on each field, so they're reachable by keyboard, Full Keyboard Access, and VoiceOver, not only on hover. (#1490) - VoiceOver reliability: grid selection changes are announced to all assistive technologies (not only when VoiceOver was already on), the drop and truncate dialog toggles describe their effect, and the favorite query editor is labeled. (#1490) - Tab moves keyboard focus between the window panes (sidebar, results, inspector) by rebuilding the key view loop when the window appears. (#1490) diff --git a/TablePro/Views/ConnectionForm/Panes/AIRulesPaneView.swift b/TablePro/Views/ConnectionForm/Panes/AIRulesPaneView.swift index fc7fe7fb0..f68e00ec5 100644 --- a/TablePro/Views/ConnectionForm/Panes/AIRulesPaneView.swift +++ b/TablePro/Views/ConnectionForm/Panes/AIRulesPaneView.swift @@ -87,5 +87,17 @@ private struct AIRulesEditor: NSViewRepresentable { guard let textView = notification.object as? NSTextView else { return } text.wrappedValue = textView.string } + + func textView(_ textView: NSTextView, doCommandBy commandSelector: Selector) -> Bool { + if commandSelector == #selector(NSResponder.insertTab(_:)) { + textView.window?.selectNextKeyView(nil) + return true + } + if commandSelector == #selector(NSResponder.insertBacktab(_:)) { + textView.window?.selectPreviousKeyView(nil) + return true + } + return false + } } }