Skip to content

Commit

Permalink
add get remote clipboard to web-rdp #4133
Browse files Browse the repository at this point in the history
Signed-off-by: si458 <simonsmith5521@gmail.com>
  • Loading branch information
si458 committed Jan 14, 2024
1 parent 0b0f299 commit b01078b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions public/mstsc/client.js
Expand Up @@ -16,6 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* added get clipboard from remote RDP - Simon Smith 2024
*/

(function() {
/**
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b01078b

Please sign in to comment.