diff --git a/src/gameplay/client_player.cpp b/src/gameplay/client_player.cpp index fe63a2f..21f6396 100644 --- a/src/gameplay/client_player.cpp +++ b/src/gameplay/client_player.cpp @@ -191,6 +191,7 @@ bool ClientPlayer::update_player_move_state(Key key, KeyAction action) { } } else if (key == Key::LEFT_CTRL) { if (action == KeyAction::PRESS) { + m_sprinting = true; } /* diff --git a/src/ui/text_field.cpp b/src/ui/text_field.cpp index 149edac..3887480 100644 --- a/src/ui/text_field.cpp +++ b/src/ui/text_field.cpp @@ -246,12 +246,14 @@ bool TextField::handle_key_event(const KeyEvent& e) { } } if (e.key == Key::LEFT_CTRL) { - if (e.action == KeyAction::PRESS) { - m_ctrl_press = true; - return true; - } else if (e.action == KeyAction::RELEASE) { - m_ctrl_press = false; - return true; + if (m_typing) { + if (e.action == KeyAction::PRESS) { + m_ctrl_press = true; + return true; + } else if (e.action == KeyAction::RELEASE) { + m_ctrl_press = false; + return true; + } } }