diff options
Diffstat (limited to 'web/share/js/kvm/paste.js')
-rw-r--r-- | web/share/js/kvm/paste.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/share/js/kvm/paste.js b/web/share/js/kvm/paste.js index 3fe1d62c..f42fa22c 100644 --- a/web/share/js/kvm/paste.js +++ b/web/share/js/kvm/paste.js @@ -34,6 +34,7 @@ export function Paste(__recorder) { var __init__ = function() { tools.storage.bindSimpleSwitch($("hid-pak-ask-switch"), "hid.pak.ask", true); + tools.storage.bindSimpleSwitch($("hid-pak-slow-switch"), "hid.pak.slow", false); tools.storage.bindSimpleSwitch($("hid-pak-secure-switch"), "hid.pak.secure", false, function(value) { $("hid-pak-text").style.setProperty("-webkit-text-security", (value ? "disc" : "none")); }); @@ -67,10 +68,11 @@ export function Paste(__recorder) { tools.el.setEnabled($("hid-pak-keymap-selector"), false); let keymap = $("hid-pak-keymap-selector").value; + let slow = $("hid-pak-slow-switch").checked; tools.debug(`HID: paste-as-keys ${keymap}: ${text}`); - tools.httpPost("/api/hid/print", {"limit": 0, "keymap": keymap}, function(http) { + tools.httpPost("/api/hid/print", {"limit": 0, "keymap": keymap, "slow": slow}, function(http) { tools.el.setEnabled($("hid-pak-text"), true); tools.el.setEnabled($("hid-pak-button"), true); tools.el.setEnabled($("hid-pak-keymap-selector"), true); @@ -80,7 +82,7 @@ export function Paste(__recorder) { } else if (http.status !== 200) { wm.error("HID paste error", http.responseText); } else if (http.status === 200) { - __recorder.recordPrintEvent(text, keymap); + __recorder.recordPrintEvent(text, keymap, slow); } }, text, "text/plain"); }; |