From b01078bf5590c949e9cdd1a7739f595c8f2f4aaa Mon Sep 17 00:00:00 2001 From: si458 Date: Sun, 14 Jan 2024 16:56:13 +0000 Subject: [PATCH] add get remote clipboard to web-rdp #4133 Signed-off-by: si458 --- public/mstsc/client.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/public/mstsc/client.js b/public/mstsc/client.js index 317a5114..502c31e4 100644 --- a/public/mstsc/client.js +++ b/public/mstsc/client.js @@ -16,6 +16,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +/* + * added get clipboard from remote RDP - Simon Smith 2024 + */ (function() { /** @@ -206,6 +209,14 @@ next(err); break; } + case 'rdp-clipboard': { + if ((msg[1] != null) && (navigator.clipboard.writeText != null)) { + navigator.clipboard.writeText(msg[1]) // Put remote clipboard data into our clipboard + .then(function() { }) + .catch(function(err) { console.log('clipboard.writeText Error', err); }); + } + break; + } } } else { // This is binary bitmap data, store it.