Open eric-normal opened 1 year ago
Based on the documentation from the link, the SPEObject in @splinetool/runtime has the following method:
/**
* Triggers a Spline event.
* Starts from first state to last state.
* @param {string} eventName String that matches the Spline event's name
* @param {string} uuid String to match to the object's uuid
*/
emitEvent: (eventName: SplineEventName) => void;
Thus, it appears necessary to ensure compatibility with this implementation. However, it may be required to align the event details on the Spline side as well....
Hi, I'm also having the same issue. I need to emit a keyDown with a specific key but can't find how to do it in the documentation.
This issue is more than one year old. There still no solution for this?
Here is a really hacky workaround that I've found: document.dispatchEvent(new KeyboardEvent("keydown", { key: "l" }))
According to the doc, emitEvent takes in an event name, but this won't work with the keyup or keydown event when you need to specific a key as well.