Right Click inventory Detection

Say I wanted to run a function when the player right clicks a certain item in a certain inventory slot. What could be done to do that / where can I go to find how to do that>
Continue to help post