ws api refactoring

This commit is contained in:
Devaev Maxim
2019-12-10 05:53:29 +03:00
parent 3048fc7923
commit f5a6fe35a9
5 changed files with 30 additions and 41 deletions

View File

@@ -126,9 +126,8 @@ export function Keyboard() {
tools.debug("Keyboard: key", (state ? "pressed:" : "released:"), code);
if (__ws) {
__ws.send(JSON.stringify({
event_type: "key",
key: code,
state: state,
"event_type": "key",
"event": {"key": code, "state": state},
}));
}
};