pikvm/pikvm#1334: Bad link mode for keyboard events

This commit is contained in:
Maxim Devaev
2024-12-30 18:55:59 +02:00
parent d52bb34bb9
commit fed3bf1efd
9 changed files with 53 additions and 17 deletions

View File

@@ -316,6 +316,9 @@ export function Session() {
if (event_type == "key") {
let data = __ascii_encoder.encode("\x01\x00" + event.key);
data[1] = (event.state ? 1 : 0);
if (event.finish === true) { // Optional
data[1] |= 0x02;
}
ws.send(data);
} else if (event_type == "mouse_button") {