mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 10:01:53 +08:00
interactive hid leds
This commit is contained in:
@@ -14,10 +14,14 @@ var mouse = new function() {
|
||||
};
|
||||
|
||||
this.setSocket = function(ws) {
|
||||
$("hid-mouse-led").className = (ws ? "led-on" : "led-off");
|
||||
__ws = ws;
|
||||
};
|
||||
|
||||
this.updateLeds = function() {
|
||||
var focused = (__ws && document.activeElement === $("stream-window"));
|
||||
$("hid-mouse-led").className = (focused ? "led-on" : "led-off");
|
||||
};
|
||||
|
||||
var __buttonHandler = function(event, state) {
|
||||
// https://www.w3schools.com/jsref/event_button.asp
|
||||
switch (event.button) {
|
||||
|
||||
Reference in New Issue
Block a user