Skip to content

Commit

Permalink
Allow setting two BarSelect options to the same key to toggle between…
Browse files Browse the repository at this point in the history
… them

Closes #2395
  • Loading branch information
JannisX11 committed Aug 26, 2024
1 parent 6e239b6 commit 7e928b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/interface/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,10 @@ addEventListeners(document, 'keydown mousedown', function(e) {
for (let sub_id in action.sub_keybinds) {
let sub = action.sub_keybinds[sub_id];
if (sub.keybind.isTriggered(e)) {
let value_before = action.value;
sub.trigger(e)
used = true;
if (action instanceof BarSelect && value_before != action.value) break;
}
}
}
Expand Down

0 comments on commit 7e928b6

Please sign in to comment.