I wrote bash script that will do that (for linux). It will require internet too. All you need to do is
- create a launcher for the script and put it on the panel.
- Highlight the text you want to transfer and click on the launcher.
- A barcode will appear on the screen and you can scan that.