Skip to content

Commit

Permalink
fix: reset keybinding to "Unbound locally!" now works
Browse files Browse the repository at this point in the history
  • Loading branch information
Brambor committed Nov 28, 2024
1 parent 286cff2 commit b1b768a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/input_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,11 @@ bool input_context::action_reset( const std::string &action_id )
if( iter_action == iter_def->second.end() ) {
continue;
}
if( iter_action->second.input_events.empty() ) {
// special case: reset to an empty local keybinding "Unbound locally!"
inp_mngr.get_or_create_event_list( action_id, context );
continue;
}
for( const input_event &event : iter_action->second.input_events ) {
inp_mngr.add_input_for_action( action_id, context, event );
}
Expand Down

0 comments on commit b1b768a

Please sign in to comment.