mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	First pass at adding RDP clipboard support, #3810.
This commit is contained in:
		
							parent
							
								
									97ff7a1669
								
							
						
					
					
						commit
						af052ddfe7
					
				
					 10 changed files with 446 additions and 21 deletions
				
			
		|  | @ -87,6 +87,7 @@ function RdpClient(config) { | |||
|     this.x224 = new x224.Client(this.tpkt, config); | ||||
|     this.mcs = new t125.mcs.Client(this.x224); | ||||
|     this.sec = new pdu.sec.Client(this.mcs, this.tpkt); | ||||
|     this.cliprdr = new pdu.cliprdr.Client(this.mcs); | ||||
|     this.global = new pdu.global.Client(this.sec, this.sec); | ||||
| 
 | ||||
|     // config log level
 | ||||
|  | @ -145,6 +146,9 @@ function RdpClient(config) { | |||
|             this.mcs.clientCoreData.obj.kbdLayout.value = t125.gcc.KeyboardLayout.US; | ||||
|     } | ||||
| 
 | ||||
|     this.cliprdr.on('clipboard', (content) => { | ||||
|         this.emit('clipboard', content) | ||||
|     }); | ||||
| 
 | ||||
|     //bind all events
 | ||||
|     var self = this; | ||||
|  | @ -328,6 +332,14 @@ RdpClient.prototype.sendWheelEvent = function (x, y, step, isNegative, isHorizon | |||
|     this.global.sendInputEvents([event]); | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  * Clipboard event | ||||
|  * @param data {String} content for clipboard | ||||
|  */ | ||||
| RdpClient.prototype.setClipboardData = function (content) { | ||||
|     this.cliprdr.setClipboardData(content); | ||||
| } | ||||
| 
 | ||||
| function createClient(config) { | ||||
|     return new RdpClient(config); | ||||
| }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue