Skip to content

Commit

Permalink
Ignore NO_KEY on keypad change message.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwww committed Oct 2, 2024
1 parent a8ddee0 commit 6bbf9c4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions elkm1_lib/keypads.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ 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 6bbf9c4

Please sign in to comment.