Added reverse mouse wheel option to remote desktop and Intel AMT KVM.
This commit is contained in:
parent
f150e3ac5f
commit
d4502f7b11
|
@ -533,6 +533,9 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
|
|||
else if (Button == obj.MouseButton.RIGHT) { Button = obj.MouseButton.LEFT; }
|
||||
}
|
||||
|
||||
// Reverse mouse wheel if needed
|
||||
if (obj.ReverseMouseWheel) { Delta = -1 * Delta; }
|
||||
|
||||
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));
|
||||
|
|
|
@ -931,6 +931,10 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) {
|
|||
else if (typeof e.detail == 'number') { v = -1 * e.detail; }
|
||||
else if (typeof e.wheelDelta == 'number') { v = e.wheelDelta; }
|
||||
if (v == 0) return;
|
||||
|
||||
// Reverse mouse wheel if needed
|
||||
if (obj.ReverseMouseWheel) { v = -1 * v; }
|
||||
|
||||
var tmpmask = obj.buttonmask;
|
||||
obj.buttonmask |= (1 << ((v > 0) ? 3 : 4));
|
||||
obj.mousemove(e, 1);
|
||||
|
|
|
@ -1323,6 +1323,7 @@
|
|||
<div>Other Settings</div>
|
||||
<div id="d7otherset2" style="display:block">
|
||||
<label style="display:block"><input type="checkbox" id="d7deskSwapMouse" />Swap Mouse Buttons</label>
|
||||
<label style="display:block"><input type="checkbox" id="d7deskrmw" />Reverse Mouse Wheel</label>
|
||||
<label style="display:block"><input type="checkbox" id="d7deskRemoteKeyMap" />Use Remote Keyboard Map</label>
|
||||
<label style="display:block" id="d7deskAutoClipboardLabel"><input type="checkbox" id="d7deskAutoClipboard" />Automatic Clipboard</label>
|
||||
<label style="display:block" id="d7deskAutoLockLabel"><input type="checkbox" id="d7deskAutoLock" />Lock on Disconnect</label>
|
||||
|
@ -1346,6 +1347,7 @@
|
|||
<label style="display:block"><input type="checkbox" id="d7showfocus" />Show Focus Tool</label>
|
||||
<label style="display:block"><input type="checkbox" id="d7showcursor" />Show Local Mouse Cursor</label>
|
||||
<label style="display:block"><input type="checkbox" id="d7localKeyMap" />Local Keyboard Map</label>
|
||||
<label style="display:block"><input type="checkbox" id="d7kvmrmw" />Reverse Mouse Wheel</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4853,6 +4855,7 @@
|
|||
desk.m.ScalingLevel = multidesktopsettings.scaling;
|
||||
if (multidesktopsettings.framerate) { desk.m.FrameRateTimer = multidesktopsettings.framerate; }
|
||||
if (multidesktopsettings.swapmouse) { desk.m.SwapMouse = multidesktopsettings.swapmouse; }
|
||||
if (multidesktopsettings.rmw) { desk.m.ReverseMouseWheel = multidesktopsettings.rmw; }
|
||||
if (multidesktopsettings.remotekeymap == true) { desk.m.remoteKeyMap = multidesktopsettings.remotekeymap; }
|
||||
//desk.m.onDisplayinfo = deskDisplayInfo;
|
||||
desk.m.onScreenSizeChange = mdeskAdjust; // Multi-Desktop Adjust
|
||||
|
@ -8467,6 +8470,7 @@
|
|||
desktop.m.bpp = (desktopsettings.encoding == 1 || desktopsettings.encoding == 3) ? 1 : 2;
|
||||
desktop.m.useZRLE = (desktopsettings.encoding < 3);
|
||||
desktop.m.localKeyMap = desktopsettings.localkeymap;
|
||||
desktop.m.ReverseMouseWheel = desktopsettings.kvmrmw;
|
||||
desktop.m.showmouse = desktopsettings.showmouse;
|
||||
desktop.m.onScreenSizeChange = deskAdjust;
|
||||
desktop.m.onKvmData = function (x) {
|
||||
|
@ -8579,6 +8583,7 @@
|
|||
desktop.m.ScalingLevel = desktopsettings.scaling;
|
||||
if (desktopsettings.framerate) { desktop.m.FrameRateTimer = desktopsettings.framerate; }
|
||||
if (desktopsettings.swapmouse) { desktop.m.SwapMouse = desktopsettings.swapmouse; }
|
||||
if (desktopsettings.rmw) { desktop.m.ReverseMouseWheel = desktopsettings.rmw; }
|
||||
if (desktopsettings.remotekeymap == true) { desktop.m.remoteKeyMap = desktopsettings.remotekeymap; }
|
||||
desktop.m.onDisplayinfo = deskDisplayInfo;
|
||||
desktop.m.onScreenSizeChange = deskAdjust;
|
||||
|
@ -8878,10 +8883,12 @@
|
|||
desktopsettings.scaling = d7bitmapscaling.value;
|
||||
desktopsettings.framerate = d7framelimiter.value;
|
||||
desktopsettings.swapmouse = d7deskSwapMouse.checked;
|
||||
desktopsettings.rmw = d7deskrmw.checked;
|
||||
desktopsettings.remotekeymap = d7deskRemoteKeyMap.checked;
|
||||
desktopsettings.autoclipboard = d7deskAutoClipboard.checked;
|
||||
desktopsettings.autolock = d7deskAutoLock.checked;
|
||||
desktopsettings.localkeymap = d7localKeyMap.checked;
|
||||
desktopsettings.kvmrmw = d7kvmrmw.checked;
|
||||
desktopsettings.rdpsize = d7rdpsize.value;
|
||||
desktopsettings.rdpsmb = d7rdpsmb.checked;
|
||||
desktopsettings.rdprmw = d7rdprmw.checked;
|
||||
|
@ -8893,19 +8900,21 @@
|
|||
applyDesktopSettings();
|
||||
updateDesktopButtons();
|
||||
if (desktop) {
|
||||
if (desktop.contype == 1) {
|
||||
if (desktop.contype == 1) { // Intel AMT KVM
|
||||
desktop.m.SwapMouse = desktopsettings.swapmouse;
|
||||
desktop.m.ReverseMouseWheel = desktopsettings.rmw;
|
||||
desktop.m.remoteKeyMap = desktopsettings.remotekeymap;
|
||||
if (desktop.State != 0) {
|
||||
desktop.m.SendCompressionLevel(webpSupport?4:1, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate);
|
||||
desktop.sendCtrlMsg('{"ctrlChannel":"102938","type":"autolock","value":' + desktopsettings.autolock + '}');
|
||||
}
|
||||
}
|
||||
if (desktop.contype == 2) {
|
||||
if (desktop.contype == 2) { // Mesh Agent Remote Desktop
|
||||
desktop.m.ReverseMouseWheel = desktopsettings.kvmrmw;
|
||||
if (desktopsettings.showfocus == false) { desktop.m.focusmode = 0; deskFocusBtn.value = "All Focus"; }
|
||||
if (desktop.State != 0) { desktop.Stop(); setTimeout(function () { connectDesktop(null, 2); }, 50); }
|
||||
}
|
||||
if (desktop.contype == 4) {
|
||||
if (desktop.contype == 4) { // Web-RDP
|
||||
desktop.m.SwapMouse = desktopsettings.rdpsmb;
|
||||
desktop.m.ReverseMouseWheel = desktopsettings.rdprmw;
|
||||
}
|
||||
|
@ -8924,10 +8933,12 @@
|
|||
d7bitmapscaling.value = desktopsettings.scaling;
|
||||
if (desktopsettings.framerate) { d7framelimiter.value = desktopsettings.framerate; } else { d7framelimiter.value = 100; }
|
||||
if (desktopsettings.swapmouse != null) { d7deskSwapMouse.checked = desktopsettings.swapmouse; }
|
||||
if (desktopsettings.rmw != null) { d7deskrmw.checked = desktopsettings.rmw; }
|
||||
if (desktopsettings.remotekeymap != null) { d7deskRemoteKeyMap.checked = desktopsettings.remotekeymap; }
|
||||
if (desktopsettings.autoclipboard != null) { d7deskAutoClipboard.checked = desktopsettings.autoclipboard; }
|
||||
if (desktopsettings.autolock != null) { d7deskAutoLock.checked = desktopsettings.autolock; }
|
||||
if (desktopsettings.localkeymap) { d7localKeyMap.checked = desktopsettings.localkeymap; }
|
||||
if (desktopsettings.kvmrmw) { d7kvmrmw.checked = desktopsettings.kvmrmw; }
|
||||
QV('deskFocusBtn', (desktop != null) && (desktop.contype == 2) && (desktop.state != 0) && (desktopsettings.showfocus));
|
||||
if (desktopsettings.rdpsize != null) { d7rdpsize.value = desktopsettings.rdpsize; }
|
||||
if (desktopsettings.rdpflags == null) { desktopsettings.rdpflags = 0x2F; }
|
||||
|
|
Loading…
Reference in New Issue