mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
sys: Added "New File..." menu item and shortcut
This commit is contained in:
@@ -4,11 +4,14 @@
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
void registerShortcuts() {
|
||||
// New file
|
||||
ShortcutManager::addGlobalShortcut(CTRL + Keys::N, [] {
|
||||
EventManager::post<RequestOpenWindow>("Create File");
|
||||
});
|
||||
|
||||
// Open file
|
||||
ShortcutManager::addGlobalShortcut(CTRL + Keys::O, [] {
|
||||
fs::openFileBrowser(fs::DialogMode::Open, {}, [](const auto &path) {
|
||||
EventManager::post<RequestOpenFile>(path);
|
||||
});
|
||||
EventManager::post<RequestOpenWindow>("Open File");
|
||||
});
|
||||
|
||||
// Close file
|
||||
|
||||
Reference in New Issue
Block a user