crazyshoutt I want to create a relative path copy function when left clicking. Please help.
You mean when right-clicking?
You can create custom buttons in the contextmenu, see Javascript config:
www.files.gallery/docs/javascript-config/
You would have to create your own copy-text function.
crazyshoutt If this is difficult, I would like to change the link copy function that appears when right-clicking.
You can't "change" existing buttons. You need to create a new one, as stated above, based on your own requirements.