Skip to content

Commit

Permalink
More format stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
HazardousPeach committed Nov 4, 2024
1 parent fa8922e commit 9b327f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/keybind/keybind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace Toolbox {
bool KeyBind::isInputMatching() const {
return std::all_of(m_key_combo.begin(), m_key_combo.end(),
[](Input::KeyCode keybind) { return Input::GetKey(keybind); }) &&
(Input::GetPressedKeyModifiers() & m_key_mods) == m_key_mods;
(Input::GetPressedKeyModifiers() & m_key_mods) == m_key_mods;
}

std::string KeyBind::toString() const {
Expand Down Expand Up @@ -102,7 +102,8 @@ namespace Toolbox {
bool KeyBind::scanNextInputKey() {
// Check if any of the keys are still being held
bool any_keys_held = std::any_of(m_key_combo.begin(), m_key_combo.end(),
[](Input::KeyCode key) { return Input::GetKey(key); }) || !!(Input::GetPressedKeyModifiers() & m_key_mods);
[](Input::KeyCode key) { return Input::GetKey(key); }) ||
!!(Input::GetPressedKeyModifiers() & m_key_mods);
if (m_key_combo.size() > 0 && !any_keys_held) {
return true;
}
Expand Down

0 comments on commit 9b327f8

Please sign in to comment.