make NewLock accept Key and Space