only take mouse input in mouse mode
Merge branch 'master' into gh-pages, update JS