[nostalgia/studio] Make studio only pass key input to Editors if it does not consume it itself
This commit is contained in:
parent
313e60c3d8
commit
ab1dc83630
@ -59,7 +59,8 @@ void StudioUI::update() noexcept {
|
||||
}
|
||||
|
||||
void StudioUI::handleKeyEvent(core::Key key, bool down) noexcept {
|
||||
if (down && core::buttonDown(m_ctx, core::Key::Mod_Ctrl)) {
|
||||
const auto ctrlDown = core::buttonDown(m_ctx, core::Key::Mod_Ctrl);
|
||||
if (down && ctrlDown) {
|
||||
switch (key) {
|
||||
case core::Key::Num_1:
|
||||
toggleProjectExplorer();
|
||||
@ -89,10 +90,12 @@ void StudioUI::handleKeyEvent(core::Key key, bool down) noexcept {
|
||||
undo();
|
||||
break;
|
||||
default:
|
||||
if (m_activeEditor) {
|
||||
m_activeEditor->keyStateChanged(key, down);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (m_activeEditor) {
|
||||
} else if (m_activeEditor && !ctrlDown) {
|
||||
m_activeEditor->keyStateChanged(key, down);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user