protected void OnKeyUpEvent(int keyCode)
 {
     KeyUpEvent?.Invoke(this, new OriginalKeyEventArg(keyCode));
 }
예제 #2
0
 protected override void OnKeyUp(KeyUpEvent e)
 {
 }
        void UpdateEventbaseInfo(EventDebuggerEventRecord eventBase, IEventHandler focused, IEventHandler capture)
        {
            ClearEventbaseInfo();

            if (eventBase == null)
            {
                return;
            }

            m_EventbaseInfo.text += "Focused element: " + EventDebugger.GetObjectDisplayName(focused) + "\n";
            m_EventbaseInfo.text += "Capture element: " + EventDebugger.GetObjectDisplayName(capture) + "\n";

            if (eventBase.eventTypeId == MouseMoveEvent.TypeId() ||
                eventBase.eventTypeId == MouseOverEvent.TypeId() ||
                eventBase.eventTypeId == MouseDownEvent.TypeId() ||
                eventBase.eventTypeId == MouseUpEvent.TypeId() ||
                eventBase.eventTypeId == DragUpdatedEvent.TypeId() ||
                eventBase.eventTypeId == DragPerformEvent.TypeId() ||
                eventBase.eventTypeId == DragExitedEvent.TypeId() ||
                eventBase.eventTypeId == ContextClickEvent.TypeId())
            {
                m_EventbaseInfo.text += "Mouse position: " + eventBase.mousePosition + "\n";
            }

            if (eventBase.eventTypeId == MouseDownEvent.TypeId() ||
                eventBase.eventTypeId == MouseUpEvent.TypeId() ||
                eventBase.eventTypeId == DragUpdatedEvent.TypeId() ||
                eventBase.eventTypeId == DragPerformEvent.TypeId() ||
                eventBase.eventTypeId == DragExitedEvent.TypeId() ||
                eventBase.eventTypeId == KeyDownEvent.TypeId() ||
                eventBase.eventTypeId == KeyUpEvent.TypeId())
            {
                m_EventbaseInfo.text += "Modifiers: " + eventBase.modifiers + "\n";
            }

            if (eventBase.eventTypeId == MouseDownEvent.TypeId() ||
                eventBase.eventTypeId == MouseUpEvent.TypeId() ||
                eventBase.eventTypeId == DragUpdatedEvent.TypeId() ||
                eventBase.eventTypeId == DragPerformEvent.TypeId() ||
                eventBase.eventTypeId == DragExitedEvent.TypeId())
            {
                m_EventbaseInfo.text += "Button: " + (eventBase.button == 0 ? "Left" : eventBase.button == 1 ? "Middle" : "Right") + "\n";
                m_EventbaseInfo.text += "Click count: " + eventBase.clickCount + "\n";
            }

            if (eventBase.eventTypeId == WheelEvent.TypeId())
            {
                m_EventbaseInfo.text += "Mouse delta: " + eventBase.delta + "\n";
            }

            if (eventBase.eventTypeId == KeyDownEvent.TypeId() ||
                eventBase.eventTypeId == KeyUpEvent.TypeId())
            {
                if (char.IsControl(eventBase.character))
                {
                    m_EventbaseInfo.text += "Character: \\" + (byte)(eventBase.character) + "\n";
                }
                else
                {
                    m_EventbaseInfo.text += "Character: " + eventBase.character + "\n";
                }

                m_EventbaseInfo.text += "Key code: " + eventBase.keyCode + "\n";
            }

            if (eventBase.eventTypeId == ValidateCommandEvent.TypeId() ||
                eventBase.eventTypeId == ExecuteCommandEvent.TypeId())
            {
                m_EventbaseInfo.text += "Command: " + eventBase.commandName + "\n";
            }
        }
예제 #4
0
 public void KeyUp(object sender, KeyEventArgs args)
 {
     KeyUpEvent?.Invoke(sender, args);
 }
예제 #5
0
 protected override bool OnKeyUp(KeyUpEvent e)
 {
     secondaryActive = e.ShiftPressed;
     updateText();
     return(base.OnKeyUp(e));
 }
예제 #6
0
 private void HandleValueChanged(KeyUpEvent evt)
 {
     Dispatcher.Dispatch(new Action(ActionTypes.PACKAGE_LIST_SEARCH_CHANGED, input.text));
 }
예제 #7
0
 protected override bool OnKeyUp(KeyUpEvent e)
 {
     ++KeyUpCount;
     return(base.OnKeyUp(e));
 }
 protected override void OnKeyUp(KeyUpEvent e)
 {
     ++KeyUpCount;
     base.OnKeyUp(e);
 }
예제 #9
0
 protected override void OnKeyUp(KeyboardKeyEventArgs e)
 {
     KeyUpEvent.Call(e.Key);
     base.OnKeyUp(e);
 }
예제 #10
0
 protected override void OnKeyUp(KeyUpEvent e)
 {
     updateText(e.ShiftPressed);
     base.OnKeyUp(e);
 }
예제 #11
0
 public override bool OnKeyUp(KeyUpEvent e)
 {
     return(onKeyUp != null && onKeyUp(e));
 }
예제 #12
0
 protected override bool OnKeyUp(KeyUpEvent e)
 {
     IsSelecting = IsSelectKeyPressed(e);
     UpdateColor();
     return(base.OnKeyUp(e));
 }
예제 #13
0
 /// <summary>
 /// 激发KeyUpEvent事件
 /// </summary>
 private void OnKeyUpEvent(char chr)
 {
     KeyUpEvent?.Invoke(chr);
 }
예제 #14
0
 protected override void OnKeyUp(KeyUpEvent e)
 {
     UpReceived = true;
     KeyUp?.Invoke();
 }
예제 #15
0
 protected override void OnKeyUp(KeyUpEvent e)
 {
     secondaryActive = e.ShiftPressed;
     updateText();
     base.OnKeyUp(e);
 }
예제 #16
0
 private void OnKeyUp(KeyUpEvent evt)
 {
     evt.Handled = false;
     pressedKeys.Remove(evt.KeyData);
 }
예제 #17
0
 public void OnKeyUpEvent(Slot slot)
 {
     KeyUpEvent?.Invoke(slot);
 }