add get remote clipboard to web-rdp #4133
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Jan 14, 2024 at 16:56 UTC
b01078bf5590c949e9cdd1a7739f595c8f2f4aaa
1 file changed
+11
public/mstsc/client.js
+11
@@ -16,6 +16,9 @@
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
+/*
20
+ * added get clipboard from remote RDP - Simon Smith 2024
21
+ */
22
23
(function() {
24
/**
@@ -206,6 +209,14 @@
209
next(err);
210
break;
211
}
212
+ case 'rdp-clipboard': {
213
+ if ((msg[1] != null) && (navigator.clipboard.writeText != null)) {
214
+ navigator.clipboard.writeText(msg[1]) // Put remote clipboard data into our clipboard
215
+ .then(function() { })
216
+ .catch(function(err) { console.log('clipboard.writeText Error', err); });
217
+ }
218
+ break;
219
+ }
220
}
221
} else {
222
// This is binary bitmap data, store it.