diff --git a/CHANGELOG.md b/CHANGELOG.md index 671c9f62e..e895228f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - `Cmd+C` now copies the focused cell value when one row is selected and a cell has focus; with multiple rows selected, or when no cell is focused, it still copies row(s) as TSV. `Cmd+Shift+C` now always copies row(s) as TSV. "Copy with Headers" stays in the Edit menu and row context menu without a default shortcut (#1332) +- `Cmd+F` toggles the data-grid filter panel when the grid is focused; the SQL editor's Find panel still opens with `Cmd+F` when the editor is focused. The old `Cmd+Shift+F` shortcut for filters is removed ### Fixed diff --git a/TablePro/Models/UI/KeyboardShortcutModels.swift b/TablePro/Models/UI/KeyboardShortcutModels.swift index 32440dd1f..11605e159 100644 --- a/TablePro/Models/UI/KeyboardShortcutModels.swift +++ b/TablePro/Models/UI/KeyboardShortcutModels.swift @@ -499,7 +499,6 @@ struct KeyboardSettings: Codable, Equatable { // View .toggleTableBrowser: KeyCombo(key: "0", command: true), .toggleInspector: KeyCombo(key: "i", command: true, option: true), - .toggleFilters: KeyCombo(key: "f", command: true, shift: true), .toggleHistory: KeyCombo(key: "y", command: true), .toggleResults: KeyCombo(key: "r", command: true, option: true), .previousResultTab: KeyCombo(key: "[", command: true, option: true), diff --git a/TablePro/TableProApp.swift b/TablePro/TableProApp.swift index d4be35c93..edf3d153c 100644 --- a/TablePro/TableProApp.swift +++ b/TablePro/TableProApp.swift @@ -481,6 +481,9 @@ struct AppMenuCommands: Commands { Button(String(localized: "Find...")) { if keyWindowIsInspector { NSApp.sendAction(#selector(InspectorViewController.toggleInspectorFilter(_:)), to: nil, from: nil) + } else if NSApp.keyWindow?.firstResponder is KeyHandlingTableView, + actions?.isTableTab == true { + actions?.toggleFilterPanel() } else { EditorEventRouter.shared.showFindPanelForKeyWindow() } diff --git a/docs/features/filtering.mdx b/docs/features/filtering.mdx index b2ebf4313..9bcbff9b6 100644 --- a/docs/features/filtering.mdx +++ b/docs/features/filtering.mdx @@ -5,7 +5,7 @@ description: Filter table data with 18 operators, raw SQL, and saved presets # Filtering -Press `Cmd+Shift+F` to open the filter panel. Type a raw SQL WHERE clause and press `Enter` to filter. Raw SQL is the default mode. +Press `Cmd+F` with the data grid focused to open the filter panel. Type a raw SQL WHERE clause and press `Enter` to filter. Raw SQL is the default mode. Each row has a column picker, operator, value field, and **+**/**−** buttons. Multiple rows combine with **AND** or **OR** (toggle in the header). Click **Apply** or press `Enter` to activate. Click **Unset** to clear all. diff --git a/docs/features/keyboard-shortcuts.mdx b/docs/features/keyboard-shortcuts.mdx index 181450b97..11aa941b1 100644 --- a/docs/features/keyboard-shortcuts.mdx +++ b/docs/features/keyboard-shortcuts.mdx @@ -71,7 +71,7 @@ TablePro is keyboard-driven. Most actions have shortcuts, and most menu shortcut | Action | Shortcut | |--------|----------| -| Find | `Cmd+F` | +| Find (SQL editor focused) | `Cmd+F` | | Find and replace | `Cmd+Option+F` | | Find next | `Cmd+G` | | Find previous | `Cmd+Shift+G` | @@ -255,7 +255,7 @@ Vim keys only apply in the SQL editor. The data grid and other panels keep their | Action | Shortcut | |--------|----------| -| Toggle filter panel | `Cmd+Shift+F` | +| Toggle filter panel (data grid focused) | `Cmd+F` | | Apply filters | `Enter` (in value field) | ## Table Structure