summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/recorder.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/share/js/kvm/recorder.js')
-rw-r--r--web/share/js/kvm/recorder.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/web/share/js/kvm/recorder.js b/web/share/js/kvm/recorder.js
index 822aa972..5d9d1553 100644
--- a/web/share/js/kvm/recorder.js
+++ b/web/share/js/kvm/recorder.js
@@ -67,8 +67,8 @@ export function Recorder() {
__recordEvent(event);
};
- self.recordPrintEvent = function(text, keymap) {
- __recordEvent({"event_type": "print", "event": {"text": text, "keymap": keymap}});
+ self.recordPrintEvent = function(text, keymap, slow) {
+ __recordEvent({"event_type": "print", "event": {"text": text, "keymap": keymap, "slow": slow}});
};
self.recordAtxButtonEvent = function(button) {
@@ -159,9 +159,12 @@ export function Recorder() {
} else if (event.event_type === "print") {
__checkType(event.event.text, "string", "Non-string print text");
- if (event.event.keymap) {
+ if (event.event.keymap !== undefined) {
__checkType(event.event.keymap, "string", "Non-string keymap");
}
+ if (event.event.slow !== undefined) {
+ __checkType(event.event.slow, "boolean", "Non-bool slow");
+ }
} else if (event.event_type === "key") {
__checkType(event.event.key, "string", "Non-string key code");
@@ -284,9 +287,12 @@ export function Recorder() {
} else if (event.event_type === "print") {
let params = {"limit": 0};
- if (event.event.keymap) {
+ if (event.event.keymap !== undefined) {
params["keymap"] = event.event.keymap;
}
+ if (event.event.slow !== undefined) {
+ params["slow"] = event.event.slow;
+ }
tools.httpPost("/api/hid/print", params, function(http) {
if (http.status === 413) {
wm.error("Too many text for paste!");