mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
Fixed pikvm/pikvm#307: mute hid switch
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user