Example:
/obj/weapon/automatic_rifle
tick() // Let's pretend this gets called a few times ever second.
if(istype(src.loc, /mob))
var/mob/M = src.loc
if(M.client)
if(M.client.IsKeyDown("LMB"))
shoot(locate(client.GetMouseCoordinates())) // Gets X, Y, Z of tile over which the cursor is hovering.
"The location argument varies with the type of control. For the map, it will be the turf where the mouse action happened. For info controls (statpanels), it will be the name of the statpanel where the action happened. For grid controls, it will be the cell where the action happened. For others controls it may vary, but most will leave this blank.
The control argument is the ID of the skin control where the action happened, such as "mappane.map" or "mainwindow.banner".
Click(location,control,params)
DblClick(location,control,params)
MouseEntered(location,control,params)
MouseExited(location,control,params)
Notice a pattern with the args "location" and "control" and "params" ?
Also, for future reference, I would suggest creating a more detailed feature request as this is pretty generic.