add get remote clipboard to web-rdp #4133
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
0b0f2999db
commit
b01078bf55
|
@ -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() {
|
||||
/**
|
||||
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue