Repository navigation
Improve searchbox UX: select text on Ctrl+F and add Enter / Shift+Enter navigation #1613
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Searching for text across QualCoder currently has a few minor UX inconsistencies:
- No automatic text selection on
Ctrl+F: In several screens (such as Text Coding, Journals, and Coding Reports), pressingCtrl+Ffocuses the search box without selecting the existing text. The user has to manually pressCtrl+AorBackspacebefore pasting or typing a replacement query. - Missing window-wide shortcut in some views: In Audio/Video coding (
code_av), Media viewing (view_av), and summary reports,Ctrl+Fis not bound at the window level to jump to the search box. - Inconsistent search box keyboard navigation:
- In Text Coding (
code_text), pressingShift+EnterinlineEdit_searchtriggers Qt's defaultreturnPressedsignal, which moves to the next result rather than the previous one. - In Journals and Audio/Video coding, pressing
EnterorShift+Enterinside the search box does not navigate results at all (requiring mouse clicks on the next/previous arrow buttons).
- In Text Coding (
Describe the solution you'd like
A unified and consistent search keyboard interaction across the application:
Ctrl+Fselection: PressingCtrl+Fanywhere in a dialog—or while already inside the search box—should focus the search box and callselectAll(), so that typing or pasting immediately replaces any previous search term.Enterfor Next: PressingEnter/Returninside the search box advances to the next search match.Shift+Enterfor Previous: PressingShift+Enter/Shift+Returninside the search box navigates to the previous search match in screens supporting bidirectional search (code_text,code_pdf,code_av,view_av,journals,edit_textfile), and safely no-ops in forward-only report screens.- Reusable helper: Centralize this behavior in
src/qualcoder/helpers.py(e.g.setup_search_shortcuts()) to keep all screens consistent without duplicating event filter logic.
Describe alternatives you've considered
- Using
F3/Shift+F3for Next/Previous: Standard in some desktop text viewers, but in QualCoder coding viewsF3is already globally assigned to "Code / Cat Memo" on the code tree widget. Keeping navigation toEnterandShift+Enterinside the search box avoids keybinding conflicts. - Implementing per-dialog event filters: Leads to duplicated code across ~10 dialog classes and risks subtle differences in modifier handling.
Additional context
I have already implemented and tested this change locally across all coding views, journals, text editing, and report dialogs, along with a dedicated unit test suite (tests/test_search_shortcuts.py). I would be happy to submit a Pull Request if this feature is welcome!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity