Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore NO_KEY in keypad change messages. #83

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions elkm1_lib/keypads.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ def _ka_handler(self, keypad_areas: list[int]) -> None:
keypad.setattr("area", keypad_areas[keypad.index], True)

def _kc_handler(self, keypad: int, key: int) -> None:
"""
Handle a keypad change message. At present this function is only handling
keypresses and does not process function key light changes and beep changes.
"""
# Ignore NO_KEY as it is not a key press
if key == KeypadKeys.NO_KEY.value:
return

# Force a change notification
self.elements[keypad].last_keypress = None
try:
Expand Down
Loading