moar keyboard

This commit is contained in:
Devaev Maxim
2018-07-09 07:45:00 +00:00
parent dec9aedb19
commit 670be54348
3 changed files with 68 additions and 26 deletions

View File

@@ -42,9 +42,9 @@ function onKeyEvent(event, state) {
// TODO: run this code under the lock
console.log("Key", (state ? "pressed:" : "released:"), event)
ws.send(JSON.stringify({
event_type: "key_event",
key_code: event.code,
key_state: state,
event_type: "key",
key: event.code,
state: state,
}));
}