How do I run code when right click is pressed? [duplicate]

I am trying to disable users of my html site from pressing right click. I already have a response to this prepared, but I cannot figure out how to run that code when someone presses right click. Does anyone know how to solve this? (I would prefer JavaScript, but I mean if it works it works)