summaryrefslogtreecommitdiff
path: root/web/share
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-05-19 09:11:44 +0300
committerDevaev Maxim <[email protected]>2021-05-19 09:11:44 +0300
commitcd802864143636955bd82f6b292af62534c4f8d5 (patch)
tree1e923f2cab7d1862e9ea1f7a4154af88b43a6a4b /web/share
parentac109043ed03013083bfd771e248ef9ac43c66c7 (diff)
Fixed pikvm/pikvm#307: mute hid switch
Diffstat (limited to 'web/share')
-rw-r--r--web/share/js/kvm/keyboard.js2
-rw-r--r--web/share/js/kvm/mouse.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/web/share/js/kvm/keyboard.js b/web/share/js/kvm/keyboard.js
index d9241ae3..1ec6b492 100644
--- a/web/share/js/kvm/keyboard.js
+++ b/web/share/js/kvm/keyboard.js
@@ -149,7 +149,7 @@ export function Keyboard(record_callback) {
"event_type": "key",
"event": {"key": code, "state": state},
};
- if (__ws) {
+ if (__ws && !$("hid-mute-switch").checked) {
__ws.send(JSON.stringify(event));
}
__record_callback(event);
diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js
index dbdbdc44..3199745b 100644
--- a/web/share/js/kvm/mouse.js
+++ b/web/share/js/kvm/mouse.js
@@ -301,7 +301,7 @@ export function Mouse(get_resolution_callback, record_callback) {
var __sendEvent = function(event_type, event) {
event = {"event_type": event_type, "event": event};
- if (__ws) {
+ if (__ws && !$("hid-mute-switch").checked) {
__ws.send(JSON.stringify(event));
}
__record_callback(event);