4

When I'm using console of digital-ocean then some operations are not working like paste through keyboard, right click of mouse and scrolling of console.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
vnnogile_user
  • 159
  • 1
  • 6
  • DigitalOcean’s Droplet console allows you to paste content since August 14, 2018, as per their official [release notes](https://www.digitalocean.com/docs/release-notes/). – caw Sep 19 '18 at 22:08

2 Answers2

4

You can use the following script (Found it here, Originally posted by @Dave Butler as commented below):

!function(){function t(){function n(t,e){s=s.concat(RFB.messages.keyEvent(t,e))}var o=e.shift(),s=[],i=o.charCodeAt(),c=-1!=='!@#$%^&*()_+{}:"<>?~|'.indexOf(o),r=XK_Shift_L;c&&n(r,1),n(i,1),n(i,0),c&&n(r,0),rfb._sock.send(s),e.length>0&&setTimeout(t,10)}var e=prompt("Enter text to be sent to console").split("");t()}();
  1. Open browser console (F12 / Ctrl+Shift+J on chrome).
  2. Paste it in.
  3. Replace "Enter text to be sent to console" with the desired command.
  4. Press enter.
Dorad
  • 3,413
  • 2
  • 44
  • 71
  • 1
    I believe the code on that blog was taken from my gist: https://gist.github.com/croepha/7b53f211ae4be3c526c3 first revision in 2015 – Dave Butler Sep 27 '17 at 06:51
  • Is my edit fair @Dave Butler? Feel free to answer yourself and i will delete my answer. – Dorad Oct 26 '17 at 14:53
0

I found their console to be pretty terrible. Have downloaded putty and now ssh into it from there - works a charm for speed & copy/pasting etc.

Jack Collins
  • 57
  • 1
  • 2
  • 7