mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Fixed remote desktop typing
This commit is contained in:
		
							parent
							
								
									ac525bc408
								
							
						
					
					
						commit
						9fa5924c5d
					
				
					 4 changed files with 36 additions and 19 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
											
										
									
								
							| 
						 | 
					@ -403,6 +403,11 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    obj.SendStringUnicode = function (str) {
 | 
				
			||||||
 | 
					        if (obj.State != 3) return;
 | 
				
			||||||
 | 
					        for (var i = 0; i < str.length; i++) { obj.send(String.fromCharCode(0x00, obj.InputType.KEYUNICODE, 0x00, 0x07, 0) + ShortToStr(str.charCodeAt(i))); }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    obj.SendKeyUnicode = function (action, val) {
 | 
					    obj.SendKeyUnicode = function (action, val) {
 | 
				
			||||||
        if (obj.State != 3) return;
 | 
					        if (obj.State != 3) return;
 | 
				
			||||||
        obj.send(String.fromCharCode(0x00, obj.InputType.KEYUNICODE, 0x00, 0x07, (action - 1)) + ShortToStr(val));
 | 
					        obj.send(String.fromCharCode(0x00, obj.InputType.KEYUNICODE, 0x00, 0x07, (action - 1)) + ShortToStr(val));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14572,10 +14572,15 @@
 | 
				
			||||||
      "zh-chs": "输入文本,然后单击“确定”以使用美式英语键盘远程输入文本。在继续操作之前,请确保将远程鼠标放置在正确的位置。",
 | 
					      "zh-chs": "输入文本,然后单击“确定”以使用美式英语键盘远程输入文本。在继续操作之前,请确保将远程鼠标放置在正确的位置。",
 | 
				
			||||||
      "zh-cht": "輸入文本,然後單擊“確定”以使用美式英語鍵盤遠程輸入文本。在繼續操作之前,請確保將遠程光標放置在正確的位置。",
 | 
					      "zh-cht": "輸入文本,然後單擊“確定”以使用美式英語鍵盤遠程輸入文本。在繼續操作之前,請確保將遠程光標放置在正確的位置。",
 | 
				
			||||||
      "xloc": [
 | 
					      "xloc": [
 | 
				
			||||||
        "default.handlebars->29->848",
 | 
					 | 
				
			||||||
        "desktop.handlebars->3->21"
 | 
					        "desktop.handlebars->3->21"
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "en": "Enter text and click OK to remotely type it. Make sure to place the remote cursor at the correct position before proceeding.",
 | 
				
			||||||
 | 
					      "xloc": [
 | 
				
			||||||
 | 
					        "default.handlebars->29->848"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "cs": "Zadejte token pro vytvoření účtu",
 | 
					      "cs": "Zadejte token pro vytvoření účtu",
 | 
				
			||||||
      "de": "Geben Sie das Kontoerstellungstoken ein",
 | 
					      "de": "Geben Sie das Kontoerstellungstoken ein",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7383,7 +7383,7 @@
 | 
				
			||||||
        function showDeskType() {
 | 
					        function showDeskType() {
 | 
				
			||||||
            if (xxdialogMode || desktop == null || desktop.State != 3) return;
 | 
					            if (xxdialogMode || desktop == null || desktop.State != 3) return;
 | 
				
			||||||
            Q('DeskType').blur();
 | 
					            Q('DeskType').blur();
 | 
				
			||||||
            var x = '<div>' + "Enter text and click OK to remotely type it using a US english keyboard. Make sure to place the remote cursor at the correct position before proceeding." + '<div>';
 | 
					            var x = '<div>' + "Enter text and click OK to remotely type it. Make sure to place the remote cursor at the correct position before proceeding." + '<div>';
 | 
				
			||||||
            x += '<textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>';
 | 
					            x += '<textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>';
 | 
				
			||||||
            setDialogMode(2, "Remote Keyboard Entry", 3, showDeskTypeEx, x);
 | 
					            setDialogMode(2, "Remote Keyboard Entry", 3, showDeskTypeEx, x);
 | 
				
			||||||
            Q('d2typeText').focus();
 | 
					            Q('d2typeText').focus();
 | 
				
			||||||
| 
						 | 
					@ -7406,6 +7406,12 @@
 | 
				
			||||||
                }, 10);
 | 
					                }, 10);
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                // MeshAgent
 | 
					                // MeshAgent
 | 
				
			||||||
 | 
					                var winagent = ((currentNode.agent.id > 0) && (currentNode.agent.id < 5));
 | 
				
			||||||
 | 
					                if (winagent) {
 | 
				
			||||||
 | 
					                    // New unicode typing
 | 
				
			||||||
 | 
					                    desktop.m.SendStringUnicode(txt);
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    // Old scan code typing. Remove this when non-Windows platforms support Unicode.
 | 
				
			||||||
                    for (var i in txt) {
 | 
					                    for (var i in txt) {
 | 
				
			||||||
                        var a = txt.charCodeAt(i), b = ltxt.charCodeAt(i);
 | 
					                        var a = txt.charCodeAt(i), b = ltxt.charCodeAt(i);
 | 
				
			||||||
                        if (((a >= 65) && (a <= 90)) || ((a >= 97) && (a <= 122))) {
 | 
					                        if (((a >= 65) && (a <= 90)) || ((a >= 97) && (a <= 122))) {
 | 
				
			||||||
| 
						 | 
					@ -7426,6 +7432,7 @@
 | 
				
			||||||
                    desktop.m.SendKeyMsgKC(x);
 | 
					                    desktop.m.SendKeyMsgKC(x);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Show clipboard dialog
 | 
					        // Show clipboard dialog
 | 
				
			||||||
        function showDeskClip() {
 | 
					        function showDeskClip() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue