# P5.js Copy Tool

**URL:** <https://discourse.processing.org/t/p5-js-copy-tool/38109>\
**Category:** Coding Questions\
**Created:** [July 26, 2022, 2:41pm UTC](https://discourse.processing.org/t/p5-js-copy-tool/38109 "2022-07-26T14:41:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![courserastudent16](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@courserastudent16](https://discourse.processing.org/u/courserastudent16)\
**Post date:** [July 26, 2022, 2:41pm UTC](https://discourse.processing.org/t/p5-js-copy-tool/38109/1 "2022-07-26T14:41:56Z")

</div>

Hello,  
I hope everyone is doing well.

I’m trying to create a copy tool using P5.js.  
I’m using a constructor function to make the tool.  
What should I add to this function below? I want the copy button to work shapes.

Thank you

```auto
select("#copyButton").mouseClicked(function(){
 
 });

```

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/f/8/f81c0d97d771b2955544283f6ee6769e15e77d64.png)

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [July 26, 2022, 5:38pm UTC](https://discourse.processing.org/t/p5-js-copy-tool/38109/2 "2022-07-26T17:38:24Z")

</div>

Hi,

It depends what you want to copy. 🙂  
I assume you want to copy objects and/or selections, so you need first handle this, and afterwards it woud be quite easy to copy/paste …

Cheers  
— mnse

PS: btw. I see several individual post from you and all questions sounds like you want that someone should do it for you.  
So, better try it yourself, and if you have concrete issues come back and ask for help for a specific issue …

---

<div class="post-metadata">

**Author:** ![courserastudent16](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@courserastudent16](https://discourse.processing.org/u/courserastudent16)\
**Post date:** [July 27, 2022, 8:34am UTC](https://discourse.processing.org/t/p5-js-copy-tool/38109/3 "2022-07-27T08:34:29Z")

</div>

Hi,

Thank you for your response!  
I want to copy shapes on the canvas that are drawn.

Cheers
