Skip to content

Commit

Permalink
Ignore NO_KEY in keypad change messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwww committed Oct 2, 2024
1 parent 35016c5 commit 7b2d7f8
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit 7b2d7f8

Please sign in to comment.