mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added mouse button swap support.
This commit is contained in:
parent
9d342b867a
commit
3cd39d37c2
4 changed files with 28 additions and 2 deletions
2
public/scripts/agent-desktop-0.0.2-min.js
vendored
2
public/scripts/agent-desktop-0.0.2-min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -43,6 +43,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
obj.CompressionLevel = 50;
|
||||
obj.ScalingLevel = 1024;
|
||||
obj.FrameRateTimer = 100;
|
||||
obj.SwapMouse = false;
|
||||
obj.FirstDraw = false;
|
||||
|
||||
obj.ScreenWidth = 960;
|
||||
|
@ -467,6 +468,12 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
if (event.detail) { Delta = (-1 * (event.detail * 120)); } else if (event.wheelDelta) { Delta = (event.wheelDelta * 3); }
|
||||
}
|
||||
|
||||
// Swap mouse buttons if needed
|
||||
if (obj.SwapMouse === true) {
|
||||
if (Button == obj.MouseButton.LEFT) { Button = obj.MouseButton.RIGHT; }
|
||||
else if (Button == obj.MouseButton.RIGHT) { Button = obj.MouseButton.LEFT; }
|
||||
}
|
||||
|
||||
var MouseMsg = "";
|
||||
if (Action == obj.KeyAction.DBLCLICK) {
|
||||
MouseMsg = String.fromCharCode(0x00, obj.InputType.MOUSE, 0x00, 0x0A, 0x00, 0x88, ((X / 256) & 0xFF), (X & 0xFF), ((Y / 256) & 0xFF), (Y & 0xFF));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue