feat: add Cmd/Ctrl+Shift+C keyboard shortcut to open compile window - #2387
feat: add Cmd/Ctrl+Shift+C keyboard shortcut to open compile window#2387haruo-gabriel wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new application command for opening the Heavy compile/export dialog and binds it to a default Cmd/Ctrl+Shift+C shortcut, intended to be available only when “Compiled Mode” (hvcc_mode) is enabled.
Changes:
- Added
CommandIDs::Compileto the command ID enum. - Registered command metadata + default keypress and wired
perform()to open the Heavy export dialog. - Updated the Main Menu “Compile…” item’s active state to track
hvcc_mode.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Source/PluginEditor.cpp | Adds the new Compile command, default shortcut (Cmd/Ctrl+Shift+C), and performs dialog launch. |
| Source/Dialogs/MainMenu.h | Attempts to disable/enable the “Compile…” menu item based on hvcc_mode. |
| Source/Constants.h | Adds CommandIDs::Compile to the command ID list. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| menuItems[getMenuItemIndex(MenuItem::Save)]->isActive = hasCanvas; | ||
| menuItems[getMenuItemIndex(MenuItem::SaveAs)]->isActive = hasCanvas; | ||
|
|
||
| menuItems[getMenuItemIndex(MenuItem::CompiledMode)]->isTicked = hvccModeEnabled; | ||
| menuItems[getMenuItemIndex(MenuItem::Compile)]->isActive = hvccModeEnabled; | ||
| } |
| case CommandIDs::Compile: { | ||
| Dialogs::showHeavyExportDialog(&openedDialog, this); | ||
| return true; | ||
| } |
|
Cool, thanks for picking up this issue! I'm not sure yet about the change that you can only open the compile menu when compiled mode is on: that may be too restrictive, and it may be unclear to new users why they cannot open the compile menu |
|
If we also include a quick button then it would make sense that it only appears when compiled-mode is active. Otherwise the popup menu could still appear even outside of compiled-mode, since this mode is mainly meant for producing warnings and modifying the quick object browser. And you can also still activate it from the menu when the mode is not active. |
Description
This PR adds the Cmd/Ctrl + Shift + C keyboard shortcut to trigger the compile export dialog when compile mode is enabled.
The shortcut choice must be validated.
Related to issue #2344
Changes
CommandIDs::Compilehvcc_mode (SettingsFile::getInstance()->getProperty<bool>("hvcc_mode"))ingetCommandInfoDialogs::showHeavyExportDialog(&openedDialog, this)inperformhvccModeEnabledWhat I've tested
Tested on Windows 11 only. Needs more testing on Mac and Linux!
Next steps