This repository was archived by the owner on Dec 12, 2023. It is now read-only.
This repository was archived by the owner on Dec 12, 2023. It is now read-only.
Hint for anyone trying to use this with runtime UI Toolkit #10
Open
Description
You'll need to populate s_RootVisualElement, but otherwise paste works thanks to this excellent plugin.
static void SendKey(string baseKey)
{
if (s_RootVisualElement == null)
return;
string appleKey = "%" + baseKey;
string naturalKey = "^" + baseKey;
{
var evt = Event.KeyboardEvent(naturalKey);
using var keyEvt = KeyDownEvent.GetPooled(evt);
s_RootVisualElement.SendEvent(keyEvt);
}
{
var evt = Event.KeyboardEvent(appleKey);
using var keyEvt = KeyDownEvent.GetPooled(evt);
s_RootVisualElement.SendEvent(keyEvt);
}
}
Metadata
Metadata
Assignees
Labels
No labels