From 826defad86ae5266de598a9e6f747062c893fb9c Mon Sep 17 00:00:00 2001 From: Eric Jiang Date: Fri, 30 Oct 2020 11:12:40 -0700 Subject: [PATCH] Accept 0x08 as first byte in addition to 0xf7 --- huion_keys.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/huion_keys.py b/huion_keys.py index a27d964..326a758 100644 --- a/huion_keys.py +++ b/huion_keys.py @@ -115,8 +115,9 @@ def get_button_press(hidraw): global SCROLL_STATE while True: sequence = hidraw.read(12) - # don't think there's anything we care about that doesn't start with 0xf7 - if sequence[0] != 0xf7: + # 0xf7 is what my Kamvas Pro 22 reads + # another model seems to send 0x08 + if sequence[0] != 0xf7 and sequence[0] != 0x08: pass if sequence[1] == 0xe0: # buttons # doesn't seem like the tablet will let you push two buttons at once