January 22, 2024
Molybden 1.1.0: global shortcuts, clipboard, window customization, file downloads
We’re excited to announce the release of Molybden 1.1.0. In this version we introduce several new features and enhancements, including global keyboard shortcuts, clipboard, window customization, and file downloads.
To install the latest version of Molybden in your project, run the following command:
npm install @molybden-apps/molybden@latest
What’s new
Global keyboard shortcuts
You can register global keyboard shortcuts for your application, which will be triggered even if the application window is not focused.
The following example demonstrates how to register the CommandOrControl+Shift+V
global keyboard shortcut:
bool success = app->globalShortcuts()->registerShortcut(
Shortcut(KeyCode::V, KeyModifier::COMMAND_OR_CTRL | KeyModifier::SHIFT),
[](const Shortcut& shortcut) {
std::cout << "Shortcut pressed!" << std::endl;
});
Read more about how to configure global shortcuts
Clipboard
You can programmatically read and write text and other kinds of data to and from the system clipboard. The following example demonstrates how to read the system clipboard data including the information about the data type:
for (const auto& item : app->clipboard()->read()) {
std::cout << "Type: " << item->type()->mimeType() << std::endl;
std::cout << "Data: " << item->data() << std::endl;
}
You can also write data of multiple types to the system clipboard using the following approach:
std::vector data = {
ClipboardData::create(ClipboardDataType::plainText(), "Hello!"),
ClipboardData::create(ClipboardDataType::html(), "<h1>Hello!</h1>"),
ClipboardData::create(ClipboardDataType::rtf(),
"{\\rtf1\\ansi{\\fonttbl\\f0\\fswiss "
"Helvetica;}\\f0\\pard\nHello, "
"{\\b bold} world!\\par\n}")};
app->clipboard()->write(data);
Read more about how to work with clipboard
Making a window always on top
You can configure your application window to always be displayed on top of other windows on macOS and Windows using the following approach:
browser->setAlwaysOnTop(true);
Downloading files by URL
You can now download any file by URL using the following approach:
browser->download("https://example.com/file.zip");
It will initiate a file download process that you can handle programmatically or let the user decide where to save the file using the native save file dialog.
Read more about how to handle file downloads
Chromium 120.0.6099.216
We upgraded Chromium to a newer version, which introduces multiple security fixes, including:
- CVE-2023-6702: Type Confusion in V8
- CVE-2023-6703: Use after free in Blink
- CVE-2023-6704: Use after free in libavif
- CVE-2023-6705: Use after free in WebRTC
- CVE-2023-6706: Use after free in FedCM
- CVE-2023-6707: Use after free in CSS
For the complete list of Chromium fixes and improvements in 120.0.6099.216
please visit
the product blog post for this version.
Enhancements
- Fixed an issue when the application binaries cannot be signed on Windows.
- Fixed an issue when the application runtime key is not generated when rebuilding Molybden project.
- Fixed an issue with the incorrect application icon position and wrong application name in Ubuntu 22.04 Dock.
- Fixed an issue when it’s not possible to change the default location of the application user data directory via
the
user_data_dir
application option on Windows.
What’s next
We’re already working on the next version of Molybden, which will include a number of new features including application auto-updates, compatibility with Mac App Store, and more. Visit our product roadmap to see what’s coming next.
If you have any questions or feature requests, please feel free to join our Discord or contact us. We will be happy to hear from you!