Skip to content

Commit

Permalink
alkjdfnhaksd
Browse files Browse the repository at this point in the history
  • Loading branch information
sezanzeb committed Feb 2, 2025
1 parent 2a09af5 commit 51e811e
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions inputremapper/injection/mapping_handlers/hierarchy_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,22 @@ def notify(
if event.input_match_hash != self._input_config.input_match_hash:
return False

success = False
handled = False
for handler in self.handlers:
# We want to be able to map EV_REL to EV_ABS, and while moving the gamepad,
# still trigger keys using EV_REL and an analog_threshold. In this case, we
# have two combinations activated at the same time.
defines_analog_input = True in [
input_config.defines_analog_input
for input_config in handler.input_configs
]
suppress = success and not defines_analog_input
success = handler.notify(event, source, suppress=suppress) or success

return success
if handled:
# We want to be able to map EV_REL to EV_ABS, and while moving the
# gamepad, still trigger keys using EV_REL and an analog_threshold.
# In this case, we have two combinations activated at the same time.
defines_analog_input = True in [
input_config.defines_analog_input
for input_config in handler.input_configs
]
handler.notify(event, source, suppress=not defines_analog_input)
continue

handled = handler.notify(event, source)

return handled

def reset(self) -> None:
for sub_handler in self.handlers:
Expand Down

0 comments on commit 51e811e

Please sign in to comment.