If your script takes keyboard control, I have noticed that rot_right and rot_left keyboard events are firing at random when you right click objects around you... but ONLY if your camera is zoomed out from your avatar. Here is sample code to trigger it, just drop it in a prim cube and sit on the cube.
default
{
state_entry()
{
llSitTarget(<0.25,0,.6>, ZERO_ROTATION);
llSetText("Sit to test a bug",<1,1,1>,1);
}
changed(integer change)
{
key av = llAvatarOnSitTarget();
if (change & CHANGED_LINK && av != NULL_KEY) llRequestPermissions(av, PERMISSION_TAKE_CONTROLS);
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TAKE_CONTROLS)
{
llTakeControls(CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT, TRUE, FALSE);
llSay(0,"Now, focus your camera on something else and zoom back, then right click on objects around you. Keyboard Control events fire at random as objects are right-clicked on."
;}
}
control(key id, integer level, integer edge)
{
integer just_pressed = level & edge;
if (just_pressed & CONTROL_ROT_RIGHT) llSay(0,"Did you right click, or did you press right arrow?"
;else if (just_pressed & CONTROL_ROT_LEFT) llSay(0,"Did you right click, or did you press left arrow?"
;}
}
