The ability to copy given text to clipboard?

I’ve always wondered whether there is a way to copy something to clipboard by using a button - since that is user-friendly.

I know we can simply press Ctrl+C… but sometimes, its better if you give the user a button to click, and that to call a function that copies XYZ text to their clipboard…

Like you can do in some web sites such as Imgur or MediaFire…

Anyone knows anything about this?

In C++ you have those functions to read and write system clipboard

Note that you need to use FPlatfromMisc not FGenericPlatfromMisc, if you see FGenericPlatfrom* class in API reference remove “Generic” because those are Generic rollback implementation of functions all that get referenced to FPlatfrom*

I dont see any blueprint implementations of this, you will need to make your own nodes if you want to which is not that hard actully.

7 Likes

I found this post while searching for a way to copy content from the Windows clipboard.
It would also be very useful to have that function in an Editor Utility Widget.

For example, in the QA report we have coordinates, I’d like to be able to copy a line of cord, switch to UE, and click a button on the Utility Widget to move the camera to that location. That’d be nice.

Seems like no luck yet? I hope it gets implemented in the near future!

Thank you

for the button use case the missing piece is just that blueprint has no stock clipboard nodes, the C++ side is FPlatformApplicationMisc::ClipboardCopy / ClipboardPaste plus the ApplicationCore module.

so a copy button is one node call with your XYZ string, and paste is the reverse node into a string variable. if you dont want to write that wrapper yourself, Runtime Clipboard Utility, a Blueprint clipboard plugin for Unreal Engine 5, gives you Copy, Paste and Has Clipboard Text nodes, free and works in 5.0-5.8: Runtime Clipboard Utility — Free Copy & Paste Text Nodes for Blueprints (UE5) | Fab

same nodes work from an editor utility widget button, so the QA coords workflow pto2k described (copy a line, click to teleport) is just paste node then parse the string.