public void KeyDownAndUp(KeyCode key, EventModifiers modifiers = EventModifiers.None) { HandleLastEventPauseVisibility(); if (EventUtility.KeyDownAndUp(window, key, modifiers)) { window.RepaintImmediately(); } }
public bool Update(EditorWindow window) { float curtime = (float)EditorApplication.timeSinceStartup; if (curtime > nextEventTime) { bool shouldContinue = caretPosition < keyCodes.Count; if (caretPosition < keyCodes.Count) { EventUtility.KeyDownAndUp(window, keyCodes[caretPosition]); caretPosition++; nextEventTime = curtime + intervalBetweenKeyInput; window.Repaint(); } return(shouldContinue); } return(true); }