In fact what I was searching for is : K_MOUSELEFT, K_MOUSERIGHT, ...
Ah, I just wanted to point out to the code that does actual reading of those key states; K_MOUSELEFT etc.. are set based on above routines. Just in case it does not work as supposed, as starting point to find a problem...