Code you provided does nothing. You need javascript code that will do this. And you can do it in theme.php.
Btw this is silly idea, because user can disable javascript and copy text anyway. Also he can use view-source code (via right click or keyboard shortcut). Smarter users can even download page and then copy.. There are many ways how to bypass it. So you have 0 ways to block right-click or text copying that works 100%.
So don't do it. It's a waste of time and annoying to users.
0 replies