public static unsafe void WriteValueFromObjectIntoEvent(this InputControl control, InputEventPtr eventPtr, object value)
        {
            if (control == null)
            {
                throw new ArgumentNullException(nameof(control));
            }

            var statePtr = control.GetStatePtrFromStateEvent(eventPtr);

            if (statePtr == null)
            {
                return;
            }

            control.WriteValueFromObjectIntoState(value, statePtr);
        }