HID: mouse RAW data
This commit is contained in:
parent
42ec2611e3
commit
0dbf3f9b7a
@ -105,7 +105,10 @@ def keyboardIndex():
|
||||
def handle_mouseEvent(data):
|
||||
print(data)
|
||||
|
||||
(btn, x, y, wheel) = struct.unpack('BHHb', data)
|
||||
btn = data[0]
|
||||
x = data[1]
|
||||
y = data[2]
|
||||
wheel = data[3]
|
||||
|
||||
print("RAW Btn: {}, X: {}, Y: {}, W: {}".format(btn, x, y, wheel))
|
||||
|
||||
|
@ -87,14 +87,11 @@
|
||||
wheel: wheel,
|
||||
}
|
||||
|
||||
var data = new Array(6);
|
||||
var data = new Array(4);
|
||||
data[0] = btn;
|
||||
data[1] = x & 255;
|
||||
data[2] = x >> 8
|
||||
data[3] = y & 255;
|
||||
data[4] = y >> 8
|
||||
data[5] = 0;
|
||||
|
||||
data[1] = x;
|
||||
data[2] = y;
|
||||
data[3] = wheel;
|
||||
|
||||
socket.emit('mouseEvent', JSON.stringify(obj));
|
||||
socket.emit('mouseEventRaw', data);
|
||||
|
Loading…
Reference in New Issue
Block a user