I have a HP 2730, it has three buttons on the side, i would like to use one(the rotate key) to initiate a shell script.

How would I go about finding out which key it calls?
So i can use Configuration Editor to assign it to call a script.