ID:2803012
 
(See the best response by Kaiochao.)
Code:
client
show_popup_menus = 0
MouseDown(atom/movable/object, location, control, params)
params = params2list(params)
if(params["right"])
world<<"Right Down"
if(params["left"])
world<<"Left Down"
MouseUp(atom/movable/object, location, control, params)
params = params2list(params)
if(params["right"])
world<<"Right Up"
if(params["left"])
world<<"Left Up"


Problem description:
So, as it stands, if I'm holding R-Mouse, and then press L-Mouse, it sends both L- and R-Mouse Down. And, when I release L-Mouse, it will send both L- and R-Mouse Up.

Is there a better way to handle this so both L- and R-Mouse are handled completely independently?
Best response
A change was made to the way the mouse params are given in recent versions.

Instead of "left", "right", "middle" only being present when that button was the cause, they are always given if the button is being held.

Now, the way to check which button caused the event is with the "button" param, which can be either "left", "right", or "middle".
In response to Kaiochao
Thanks - I was messing around and actually discovered exactly that! I modified my code to this:
client
show_popup_menus = 0
MouseDown(atom/movable/object, location, control, params)
params = params2list(params)
for(var/a in params)
if(a=="button"&&params[a]=="right") world<<"Right Down"
if(a=="button"&&params[a]=="left") world<<"Left Down"
MouseUp(atom/movable/object, location, control, params)
params = params2list(params)
for(var/a in params)
if(a=="button"&&params[a]=="right") world<<"Right UP"
if(a=="button"&&params[a]=="left") world<<"Left UP"


And it seems to work as intended. Is that the best way to go about it?
In response to Braekyn
Simpler:
client
show_popup_menus = FALSE

MouseDown(object, location, control, params)
..()
src << "pressed [params2list(params)["button"]]"

MouseUp(object, location, control, params)
..()
src << "released [params2list(params)["button"]]"
In response to Kaiochao
Oh! Slick:) Thanks so much!
From BYOND 514 onward, you should be using the "button" param for this.