Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.96k stars 536 forks source link

2 New remote desktop commands #428

Closed treicadani closed 5 years ago

treicadani commented 5 years ago

Hi Ylian,

I know you are very busy and i wanted to add 2 new commands for remote desktop that allows me to move windows from a screen out of focus to another and they are WIN+LEFT and WIN+RIGHT.

Here is the complete code i made, if you would like to add them in Meshcentral by default and not required for me to add them each time i update meshcentral.

In default.handlebars

// In <select id="deskkeys">
<option value=10>Win+Left</option>
<option value=11>Win+Right</option>

//And in deskSendKeys function
else  if (ks == 10) { // WIN-LEFT
    if (desktop.contype == 2) {
         desktop.m.sendkey([[0xffe7,1],[0xff51,1],[0xff51,0],[0xffe7,0]]); // Intel AMT: Meta-left down, Left arrow press, Left arrow release, Meta-left release
    } else {
        desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,0x5B],[desktop.m.KeyAction.DOWN,37],[desktop.m.KeyAction.UP,37],[desktop.m.KeyAction.EXUP,0x5B]]);
   }
} else if (ks == 11) { // WIN-RIGHT
    if (desktop.contype == 2) {
        desktop.m.sendkey([[0xffe7,1],[0xff53,1],[0xff53,0],[0xffe7,0]]); // Intel AMT: Meta-left down, Right arrow press, Right arrow release, Meta-left release
    } else {
        desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,0x5B],[desktop.m.KeyAction.DOWN,39],[desktop.m.KeyAction.UP,39],[desktop.m.KeyAction.EXUP,0x5B]]);
    }
}

Thanks

Ylianst commented 5 years ago

Sure, I will add it tomorrow. Your making my life easy too, thank you.

Ylianst commented 5 years ago

Published MeshCentral v0.3.9-r with your added special keys. Let me know if that works.

treicadani commented 5 years ago

They works as intended, Many thanks!