mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
changed hid protocol, added mouse support for hid
This commit is contained in:
@@ -116,10 +116,10 @@ class Hid(multiprocessing.Process):
|
||||
assert len(key_bytes) == 1, (event, key_bytes)
|
||||
tty.write(
|
||||
b"\01"
|
||||
+ (b"\01" if event.state else b"\00")
|
||||
+ key_bytes
|
||||
+ b"\00"
|
||||
+ (b"\01" if event.state else b"\00")
|
||||
+ b"\00\00"
|
||||
)
|
||||
|
||||
def __send_clear_hid(self, tty: serial.Serial) -> None:
|
||||
tty.write(b"\00\00\00\00")
|
||||
tty.write(b"\00\00\00\00\00")
|
||||
|
||||
Reference in New Issue
Block a user