mouse support
scripted update of code from master at e6f9e12 mouse support