summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/mouse.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-06-20 11:29:06 +0300
committerDevaev Maxim <[email protected]>2020-06-20 11:29:06 +0300
commitcf2f763d1bd23170cb82e0df9eff363931cc66dc (patch)
tree541f6cd3b498d2a6ccde3e0921639a588535fdba /web/share/js/kvm/mouse.js
parent490e5b352ef569ef5b3f5211523d21bbd5ed0e1c (diff)
user macro
Diffstat (limited to 'web/share/js/kvm/mouse.js')
-rw-r--r--web/share/js/kvm/mouse.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js
index dca2f4c5..9ac1fd0c 100644
--- a/web/share/js/kvm/mouse.js
+++ b/web/share/js/kvm/mouse.js
@@ -27,11 +27,13 @@ import {tools, $} from "../tools.js";
import {Keypad} from "../keypad.js";
-export function Mouse() {
+export function Mouse(record_callback) {
var self = this;
/************************************************************************/
+ var __record_callback = record_callback;
+
var __ws = null;
var __online = true;
@@ -194,9 +196,11 @@ export function Mouse() {
};
var __sendEvent = function(event_type, event) {
+ event = {"event_type": event_type, "event": event};
if (__ws) {
- __ws.send(JSON.stringify({"event_type": event_type, "event": event}));
+ __ws.send(JSON.stringify(event));
}
+ __record_callback(event);
};
__init__();