Skip to content

Commit

Permalink
add assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
sezanzeb committed Oct 4, 2024
1 parent 201ee44 commit 50d3365
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def notify(
return not self.should_release_event(event)

def should_release_event(self, event):
"""Check if the release event should be forwarded by the event-reader."""
"""Check if the key-up event should be forwarded by the event-reader."""
# Ensure that all keys that have been pressed-down at some point will get their
# proper release event injected.
# If a key-up event arrives that will inactivate the combination, but
Expand All @@ -177,7 +177,8 @@ def should_release_event(self, event):
return False

def remember(self, handled, event):
"""Remember if this event will need a release event later on."""
"""Remember if this key-down event will need a release event later on."""
assert event.value == 1
self._requires_a_release[event.type_and_code] = not handled

def reset(self) -> None:
Expand Down

0 comments on commit 50d3365

Please sign in to comment.