extended the axis detection functionality to include mouse axes and made it more generalized