One of the long standing feature requests to add a "copy code" button to questions has been implemented on Stack Overflow. For an example, see this question about beamer on SO to try out the button yourself.
According to a comment by a SE staff member, this can be requested for other SE sites as well.
The suggested procedure is to raise it on the site-specific Meta, and if there is community support then a site moderator can add status-review to notify the Community Manager. Additionally, we are encouraged to leave an answer on the Meta.SE announcement linked above.
There seems to be a demand for this feature on TeX.SE as well. For example:
- Add "Copy Code" button and language label to code blocks recently
- Better experience on this website - Copying code to clipboard two years ago
- Easy way to copy code block? fourteen years ago
So the question is: do we want to request this feature to be enabled on TeX.SE or not?