From 87afb708519996dbfd5c41b0c07c4cb014336a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Fri, 28 Jul 2023 21:12:34 -0300 Subject: [PATCH] ecode: Use default modifier for all the shortcuts using KEYMOD_CTRL. --- src/tools/ecode/ecode.cpp | 16 ++++++++-------- src/tools/ecode/plugins/lsp/lspclientplugin.cpp | 2 +- src/tools/ecode/terminalmanager.cpp | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/tools/ecode/ecode.cpp b/src/tools/ecode/ecode.cpp index b53973848..6f0247d21 100644 --- a/src/tools/ecode/ecode.cpp +++ b/src/tools/ecode/ecode.cpp @@ -1816,12 +1816,12 @@ std::map App::getLocalKeybindings() { #endif { { KEY_S, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "save-all" }, { { KEY_F9, KEYMOD_LALT }, "switch-side-panel" }, - { { KEY_J, KEYMOD_CTRL | KEYMOD_LALT | KEYMOD_SHIFT }, "terminal-split-left" }, - { { KEY_L, KEYMOD_CTRL | KEYMOD_LALT | KEYMOD_SHIFT }, "terminal-split-right" }, - { { KEY_I, KEYMOD_CTRL | KEYMOD_LALT | KEYMOD_SHIFT }, "terminal-split-top" }, - { { KEY_K, KEYMOD_CTRL | KEYMOD_LALT | KEYMOD_SHIFT }, "terminal-split-bottom" }, - { { KEY_S, KEYMOD_CTRL | KEYMOD_LALT | KEYMOD_SHIFT }, "terminal-split-swap" }, - { { KEY_T, KEYMOD_CTRL | KEYMOD_LALT | KEYMOD_SHIFT }, "reopen-closed-tab" }, + { { KEY_J, KeyMod::getDefaultModifier() | KEYMOD_LALT | KEYMOD_SHIFT }, "terminal-split-left" }, + { { KEY_L, KeyMod::getDefaultModifier() | KEYMOD_LALT | KEYMOD_SHIFT }, "terminal-split-right" }, + { { KEY_I, KeyMod::getDefaultModifier() | KEYMOD_LALT | KEYMOD_SHIFT }, "terminal-split-top" }, + { { KEY_K, KeyMod::getDefaultModifier() | KEYMOD_LALT | KEYMOD_SHIFT }, "terminal-split-bottom" }, + { { KEY_S, KeyMod::getDefaultModifier() | KEYMOD_LALT | KEYMOD_SHIFT }, "terminal-split-swap" }, + { { KEY_T, KeyMod::getDefaultModifier() | KEYMOD_LALT | KEYMOD_SHIFT }, "reopen-closed-tab" }, { { KEY_1, KEYMOD_LALT }, "toggle-status-locate-bar" }, { { KEY_2, KEYMOD_LALT }, "toggle-status-global-search-bar" }, { { KEY_3, KEYMOD_LALT }, "toggle-status-terminal" }, @@ -1829,8 +1829,8 @@ std::map App::getLocalKeybindings() { { { KEY_B, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "project-build-start" }, { { KEY_C, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "project-build-cancel" }, { { KEY_O, KEYMOD_LALT | KEYMOD_SHIFT }, "show-open-documents" }, - { { KEY_K, KEYMOD_CTRL | KEYMOD_SHIFT }, "open-workspace-symbol-search" }, - { { KEY_P, KEYMOD_CTRL | KEYMOD_SHIFT }, "open-document-symbol-search" }, + { { KEY_K, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "open-workspace-symbol-search" }, + { { KEY_P, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "open-document-symbol-search" }, }; } diff --git a/src/tools/ecode/plugins/lsp/lspclientplugin.cpp b/src/tools/ecode/plugins/lsp/lspclientplugin.cpp index 821b6354d..4b87d0de1 100644 --- a/src/tools/ecode/plugins/lsp/lspclientplugin.cpp +++ b/src/tools/ecode/plugins/lsp/lspclientplugin.cpp @@ -424,7 +424,7 @@ bool LSPClientPlugin::onMouseClick( UICodeEditor* editor, const Vector2i& pos, const Uint32& flags ) { Input* input = editor->getUISceneNode()->getWindow()->getInput(); Uint32 mod = input->getSanitizedModState(); - if ( mod != ( KEYMOD_LALT | KEYMOD_CTRL ) || ( flags & EE_BUTTON_LMASK ) == 0 ) + if ( mod != ( KEYMOD_LALT | KeyMod::getDefaultModifier() ) || ( flags & EE_BUTTON_LMASK ) == 0 ) return false; auto docPos = editor->resolveScreenPosition( pos.asFloat() ); diff --git a/src/tools/ecode/terminalmanager.cpp b/src/tools/ecode/terminalmanager.cpp index 3ccb60e19..89db53549 100644 --- a/src/tools/ecode/terminalmanager.cpp +++ b/src/tools/ecode/terminalmanager.cpp @@ -60,9 +60,9 @@ void TerminalManager::loadTerminalColorSchemes() { std::map TerminalManager::getTerminalKeybindings() { return { { { KEY_T, KeyMod::getDefaultModifier() | KEYMOD_SHIFT }, "create-new-terminal" }, - { { KEY_E, KEYMOD_CTRL | KEYMOD_LALT | KEYMOD_SHIFT }, + { { KEY_E, KeyMod::getDefaultModifier() | KEYMOD_LALT | KEYMOD_SHIFT }, UITerminal::getExclusiveModeToggleCommandName() }, - { { KEY_S, KEYMOD_LALT | KEYMOD_CTRL }, "terminal-rename" }, + { { KEY_S, KEYMOD_LALT | KeyMod::getDefaultModifier() }, "terminal-rename" }, }; }