The code is quite simple:
bind MOUSE4 "turn"
alias 2waits "wait;wait"
alias turn "cl_yawspeed 180000;+right;2waits;-right;cl_yawspeed 140"
As you can see, i just declare the alias turn, first modify the yawspeed to be right the needed one to turn 180º in 2 ms. Declare the speed, turn, 2ms, stop turn and then return the default yawspeed (the same i use). I also try it with a different button (i start to think it causes to a rawmouse issue) but it keep happening. In other q2/q3 engine games it don't happen.