1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Now, in editor, CapsLock behave like a modifier key: does nothing when pressed alone.

Before, it ended up closing the code completion, and rerendering portions of editor.
This commit is contained in:
M4rYu5
2023-02-11 07:03:25 +02:00
parent 9f6bb7dd50
commit 97d355c13d
2 changed files with 5 additions and 5 deletions

View File

@@ -436,12 +436,12 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
}
/* If a modifier has been pressed, and nothing else, return. */
if (!k->is_pressed() || k->get_keycode() == Key::CTRL || k->get_keycode() == Key::ALT || k->get_keycode() == Key::SHIFT || k->get_keycode() == Key::META) {
if (!k->is_pressed() || k->get_keycode() == Key::CTRL || k->get_keycode() == Key::ALT || k->get_keycode() == Key::SHIFT || k->get_keycode() == Key::META || k->get_keycode() == Key::CAPSLOCK) {
return;
}
/* Allow unicode handling if: */
/* No Modifiers are pressed (except shift) */
// Allow unicode handling if:
// No modifiers are pressed (except Shift and CapsLock)
bool allow_unicode_handling = !(k->is_command_or_control_pressed() || k->is_ctrl_pressed() || k->is_alt_pressed() || k->is_meta_pressed());
/* AUTO-COMPLETE */