fix bug with player not stopping when deactivated, make key support code simpler