public static void Show(View rootView) { if (rootView == null) { throw new NullReferenceException("Root view is null"); } m_rootView = rootView; }
private bool KeyDownHandler(View view, Event evt) { if (TextKeyDelegate == null) { return false; } if (m_firstKeyDown) { m_firstKeyDown = false; IsCtrlPressed = evt.control; IsShiftPressed = evt.shift; IsAltPressed = evt.alt; IsCmdPressed = evt.command; KeyCode key = GetKeyCode(evt); if (OnKeyPress(key)) { return true; } try { if (TextKeyDelegate(this, key, true)) { return true; } } catch (Exception e) { LunarPlugin.Log.error(e); } } if (Event.current.keyCode == KeyCode.Tab || Event.current.character == '\t') { Event.current.Use(); // disable focus traversal on the tab key } return false; }