Give the console first go at keyboard input (closes #3649)

This commit is contained in:
Alexander Bock
2025-07-03 11:14:14 +02:00
parent 841ad4c6fd
commit 6e18684297

View File

@@ -1373,15 +1373,15 @@ void OpenSpaceEngine::keyboardCallback(Key key, KeyModifier mod, KeyAction actio
return;
}
for (const global::callback::KeyboardCallback& func : *global::callback::keyboard) {
const bool isConsumed = func(key, mod, action, isGuiWindow);
if (!global::configuration->isConsoleDisabled) {
const bool isConsumed = global::luaConsole->keyboardCallback(key, mod, action);
if (isConsumed) {
return;
}
}
if (!global::configuration->isConsoleDisabled) {
const bool isConsumed = global::luaConsole->keyboardCallback(key, mod, action);
for (const global::callback::KeyboardCallback& func : *global::callback::keyboard) {
const bool isConsumed = func(key, mod, action, isGuiWindow);
if (isConsumed) {
return;
}