Added motion to the mouse event

This involved rewritting the input triggers to take arbitrary weights. The keyboard was rewritten to fall in line.