Hi,
I've been configuring a small "XP Pen" brand keypad/rotary input device (basically a 10-key macro keypad with a scroll-wheel).
All went well, I used the usual steps in the analyser to sniff what was being sent on each keypress and added in the relevant index/values into the JavaScript.
However when I got to keys 5 & 6 I noticed something odd. Key 6 always triggered the "Key 5 trigger!" log message (i.e; key 6 was being interpreted as key 5). Here's the relevant code:
if(reportBuffer.readUInt8(1) === 0x01) {
log('Key 5 trigger!');
bttTriggerDeviceTrigger(targetDevice, 'key5');
} else
if(reportBuffer.readUInt8(2) === 0x11) {
log('Key 6 trigger!');
bttTriggerDeviceTrigger(targetDevice, 'key6');
}
- KEY 5:
index 1 : value 01
- KEY 6:
index 2 : value 11
In theory they should be totally separate. Different values on different indices.
However on closer inspection in the analyser, I noticed that key 6
is actually sending values on both index 1 and index 2 at the same time when it's pressed. It sends 01
on index 1 and 11
on index 2.
As a result the javascript for key 5 that's listening for 01
on index 1 seems to be triggered when I press either key 5 or key 6 and key 6 is ignored.
Is there a way I can get around this please?
Thanks