Files
thechart/docs/KEYBOARD_SHORTCUTS.md
William Valentin 9372d6ef29
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
feat: Implement application preferences with JSON persistence
- Added preferences management in `preferences.py` with functions to load, save, get, set, and reset preferences.
- Introduced a configuration directory structure based on the operating system.
- Integrated preferences into the settings window, allowing users to reset settings and manage window geometry.
- Enhanced `search_filter.py` to support flexible date column names and improved filtering logic.
- Updated `settings_window.py` to include options for managing backup and configuration folder paths.
- Introduced an `UndoManager` class to handle undo actions for add/update/delete operations.
- Improved UIManager to support sorting in tree views and added a toast notification feature.
2025-08-07 16:26:17 -07:00

86 lines
3.7 KiB
Markdown

# Keyboard Shortcuts
TheChart application supports comprehensive keyboard shortcuts for improved productivity and efficient navigation.
## File Operations
- **Ctrl+S**: Save/Add new entry - Saves the current entry data to the database
- **Ctrl+Q**: Quit application - Exits the application (with confirmation dialog)
- **Ctrl+E**: Export data - Opens the export dialog window
- **Ctrl+L**: Open logs folder - Opens the application logs directory in your file manager
- **Ctrl+D**: Open data folder - Opens the data file's directory in your file manager
- **Ctrl+B**: Open backups folder - Opens the backups directory in your file manager
- **Ctrl+Shift+B**: Create backup now - Triggers a manual backup immediately
- **Ctrl+Shift+R**: Restore from backup - Choose a backup CSV to restore the data
- **Ctrl+Shift+C**: Open config folder - Opens the application configuration directory
## Data Management
- **Ctrl+N**: Clear entries - Clears all input fields to start a new entry
- **Ctrl+R** or **F5**: Refresh data - Reloads data from the CSV file and updates the display
- **Ctrl+F**: Toggle search/filter - Shows or hides the search and filter panel for data filtering
## Window Management
- **Ctrl+M**: Manage medicines - Opens the medicine management window
- **Ctrl+P**: Manage pathologies - Opens the pathology management window
## Table Operations
- **Delete**: Delete selected entry - Deletes the currently selected entry in the table (with confirmation)
- **Escape**: Clear selection - Clears the current selection in the table
- **Double-click**: Edit entry - Opens the edit dialog for the selected entry
## Help
- **F1**: Show keyboard shortcuts help - Displays a dialog with all available keyboard shortcuts
- **Ctrl+H**: Open documentation - Opens the local docs directory or README in your default viewer
## Notes
- Opening Export or Settings shows a brief toast for confirmation.
- Opening Logs/Data/Backups or Documentation shows a brief toast and a status message.
- Backup events also update a persistent "Last backup" indicator in the status bar.
## Implementation Details
### Menu Integration
All keyboard shortcuts are displayed in the menu bar next to their corresponding menu items for easy reference.
### Button Labels
Primary action buttons show their keyboard shortcuts in the button text (e.g., "Add Entry (Ctrl+S)").
### Case Sensitivity
- Shortcuts are case-insensitive
- Both `Ctrl+S` and `Ctrl+Shift+S` work
- Uppercase and lowercase variants are supported
### Focus Requirements
- Keyboard shortcuts work when the main window has focus
- Focus is automatically set to the main window on startup
- Shortcuts work across all tabs and interface elements
### Feedback System
- All operations provide feedback through the status bar
- Success and error messages are displayed
- Confirmation dialogs are shown for destructive operations (quit, delete)
## Usage Tips
### Quick Workflow
1. **Ctrl+N** - Clear fields for new entry
2. Enter data in the form
3. **Ctrl+S** - Save the entry
4. **F5** - Refresh to see updated data
5. **Ctrl+L** - Open logs folder to inspect logs if something went wrong
### Navigation
- Use **Ctrl+M** and **Ctrl+P** to quickly access management windows
- Use **Delete** to remove unwanted entries from the table
- Use **Escape** to clear selections when needed
### Getting Help
- Press **F1** anytime to see the keyboard shortcuts help dialog
- All shortcuts are also visible in the menu bar
- Button tooltips show additional keyboard shortcut information
## Accessibility
- Keyboard shortcuts provide full application functionality without mouse use
- All critical operations have keyboard equivalents
- Shortcuts follow standard application conventions (Ctrl+S for save, Ctrl+Q for quit)
- Help system is easily accessible via F1