using 3 mouse buttons now
scripted update of code from master at d1aad6e using 3 mouse buttons now