Make more complicated LeapMotion handling to prevent spurious commands