Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions devel/222_48.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Fix macOS keyboard shortcuts in file chooser dialog

## How to test
1. Open Mogan on macOS
2. Open the file dialog (File > Save or similar actions)
3. The keyboard shortcuts should work properly:
- Command+V (paste)
- Command+C (copy)
- Other standard macOS shortcuts

## Fix macOS file chooser dialog keyboard shortcuts
### What
Fixed issue #2894: keyboard shortcuts (Command+V, Command+C, etc.) not working in the file chooser dialog on macOS.

### Why
when Qt uses native file dialog on macOS, it has a keyboard shortcut issue that prevents users from using standard macOS shortcuts for copy/paste operations, negatively impacting user experience.
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sentence casing: start this sentence with a capital letter ("When") since it begins a new paragraph.

Suggested change
when Qt uses native file dialog on macOS, it has a keyboard shortcut issue that prevents users from using standard macOS shortcuts for copy/paste operations, negatively impacting user experience.
When Qt uses native file dialog on macOS, it has a keyboard shortcut issue that prevents users from using standard macOS shortcuts for copy/paste operations, negatively impacting user experience.

Copilot uses AI. Check for mistakes.
6 changes: 6 additions & 0 deletions src/Plugins/Qt/qt_chooser_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ qt_chooser_widget_rep::perform_dialog () {

QFileDialog* dialog= new QFileDialog (this->as_qwidget (), caption, path);

#ifdef OS_MACOS
// Use Qt's custom dialog on macOS to fix keyboard shortcuts
// (Command+V, Command+C, etc.)
dialog->setOption (QFileDialog::DontUseNativeDialog, true);
#endif
Comment on lines +289 to +293
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function header comment above this block says the chooser uses a native dialog on macOS/Windows, but this change explicitly forces a non-native QFileDialog on macOS. Please update that header comment (and consider rewording the inline comment from “custom dialog” to “non-native dialog”) so the documentation stays accurate for future maintenance.

Copilot uses AI. Check for mistakes.

dialog->setViewMode (QFileDialog::Detail);
if (type == "directory") dialog->setFileMode (QFileDialog::Directory);
else if (type == "image" && prompt == "")
Expand Down
Loading