Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Untested example of dealing with handled events and focused controls.
const string controlName = "My text field";
string myString = "Text";
void OnGUI ()
EventType handledEventType = Event.current.type;
GUI.SetNextControlName (controlName);
myString = GUILayout.TextField (myString);
if (Event.current.alt && handledEventType == EventType.mouseDown && Event.current.type == EventType.used && GUI.GetNameOfFocusedControl () == controlName)
Debug.Log ("Alt-click handled with focused control being " + controlName);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.