feat: Allow hex editor editing mode to be entered when pressing Enter

This commit is contained in:
WerWolv
2023-07-16 18:14:48 +02:00
parent 709f4b7e80
commit 893b06c78b
2 changed files with 19 additions and 0 deletions

View File

@@ -708,6 +708,11 @@ namespace hex::plugin::builtin {
EventManager::post<EventRegionSelected>(ImHexApi::HexEditor::ProviderRegion{ this->getSelection(), provider });
});
ShortcutManager::addShortcut(this, Keys::Enter, [this] {
if (auto cursor = this->m_hexEditor.getCursorPosition(); cursor.has_value())
this->m_hexEditor.setEditingAddress(cursor.value());
});
// Move cursor around
ShortcutManager::addShortcut(this, Keys::Up, [this] {
auto selection = getSelection();