You can create temporary event objects and use the GetEvent kernel to obtain all the current info (mouse button, x, y, key, etc.). There are also many other ways of obtaining the info. The titlescreen.sc script for example, checks if you click or press a key.
I will post some more tutorials including a solution to your question when I get back. I'll be back Tuesday and then start writing them.