diff options
author | Maxim Devaev <[email protected]> | 2022-09-21 15:42:23 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-09-21 15:42:23 +0300 |
commit | cb8534dfe72d0df4d13c36760c6d23bcd4bd0ff2 (patch) | |
tree | 2672f94a03300f000cc49f5b9ce756e07084723f /web/share/js/kvm/mouse.js | |
parent | 0ebd2da83d7441389f0a54ea47123acca5a8d4db (diff) |
refactoring
Diffstat (limited to 'web/share/js/kvm/mouse.js')
-rw-r--r-- | web/share/js/kvm/mouse.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js index f927567c..703ea095 100644 --- a/web/share/js/kvm/mouse.js +++ b/web/share/js/kvm/mouse.js @@ -168,11 +168,11 @@ export function Mouse(__getGeometry, __recordWsEvent) { event.preventDefault(); if (__absolute || __isRelativeCaptured()) { switch (event.button) { - case 0: __keypad.emit("left", state); break; - case 2: __keypad.emit("right", state); break; - case 1: __keypad.emit("middle", state); break; - case 3: __keypad.emit("up", state); break; - case 4: __keypad.emit("down", state); break; + case 0: __keypad.emitByCode("left", state); break; + case 2: __keypad.emitByCode("right", state); break; + case 1: __keypad.emitByCode("middle", state); break; + case 3: __keypad.emitByCode("up", state); break; + case 4: __keypad.emitByCode("down", state); break; } } else if (!__absolute && !__isRelativeCaptured() && !state) { $("stream-box").requestPointerLock(); |