Skip to content

Commit

Permalink
aldsjfla
Browse files Browse the repository at this point in the history
  • Loading branch information
sezanzeb committed Oct 4, 2024
1 parent 7b740f4 commit 768941f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions inputremapper/injection/mapping_handlers/combination_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,17 @@ def notify(
# combination is active: consume the event
# combination inactive: forward the event
return self._output_active

# else if it is released:
# Returning `False` means that the event-reader will forward the release.
return not self.should_release_event(event)
else:
# Else if it is released: Returning `False` means that the event-reader
# will forward the release.
return not self.should_release_event(event)

if is_activated:
# send key up events to the forwarded uinput
# Send key up events to the forwarded uinput if configured to do so.
self.forward_release()
event = event.modify(value=1)

if not is_activated:
else:
# If not activated. All required keys are not yet pressed.
if self._output_active or self.mapping.is_axis_mapping():
# we ignore the `suppress` argument for release events
# otherwise we might end up with stuck keys
Expand All @@ -150,10 +150,10 @@ def notify(
if is_pressed:
self.remember(sub_handler_result, event)
return sub_handler_result

# else if it is released:
# Returning `False` means that the event-reader will forward the release.
return not self.should_release_event(event)
else:
# Else if it is released: Returning `False` means that the event-reader
# will forward the release.
return not self.should_release_event(event)

def should_release_event(self, event: InputEvent) -> bool:
"""Check if the key-up event should be forwarded by the event-reader."""
Expand Down

0 comments on commit 768941f

Please sign in to comment.