Following question which was never answered: https://stackoverflow.com/questions/27140520/how-to-access-qgis-menu-items-using-python
Is there any way to access functions in QGIS menu using python? Particularly in my case copy and paste style but best would be to get some general way / documentation where to find what function / tool is behind menu item and if / how is possible to get to it using python?
In my case because I frequently need to copy paste one or few layers from one project to other I made simple QGIS plugin for it. It can quickly copy layer path to clipboard (also raster/vector type and name from layers panel) and paste layer (using shortcut keys ctrl+shift+c / ctrl+shift+v). It works also between two QGIS windows which is exactly what I needed. Except one thing - it does not copy layer style from project. And because copy paste style is already as part of QGIS I would like to use that as step of copy paste layer without need to try to replicate the functionality in my own code.