Skip to content

Commit

Permalink
device: correctly read profile button with no action
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Feb 10, 2024
1 parent 918a788 commit b19197a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/logitech_receiver/hidpp20.py
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,8 @@ def from_bytes(cls, bytes):
elif mapping_type == ButtonMappingTypes.Consumer_Key:
value = ButtonConsumerKeys[(bytes[2] << 8) + bytes[3]]
result = cls(behavior=behavior, type=mapping_type, value=value)
elif mapping_type == ButtonMappingTypes.No_Action:
result = cls(behavior=behavior, type=mapping_type)
elif behavior == ButtonBehaviors.Function:
value = ButtonFunctions[bytes[1]] if ButtonFunctions[bytes[1]] is not None else bytes[1]
data = bytes[3]
Expand Down

0 comments on commit b19197a

Please sign in to comment.