예제 #1
0
        public KeyboardEvent(
            KeyboardEvent keyboardEvent,
            EventPhase eventPhase,
            DisplayObject target,
            DisplayObject currentTarget)
            : base(eventPhase, target, currentTarget, keyboardEvent.Bubbles, keyboardEvent.Cancelable)
        {
            this.AltKey     = keyboardEvent.AltKey;
            this.ControlKey = keyboardEvent.ControlKey;
            this.ShiftKey   = keyboardEvent.ShiftKey;

            this.KeyDown = keyboardEvent.KeyDown;

            this.CharCode       = keyboardEvent.CharCode;
            this.AsciiCode      = keyboardEvent.AsciiCode;
            this.VirtualKeyCode = keyboardEvent.VirtualKeyCode;
        }
예제 #2
0
        internal Events.KeyboardEvent FireKeyUpCapture(Events.KeyboardEvent evt)
        {
            if (KeyUpCapture != null)
            {
                Delegate[] handlers = (Delegate[])KeyUpCapture.GetInvocationList();
                foreach (KeyboardEvent evtHandler in handlers)
                {
                    if (evt._stopImmediatePropagation)
                    {
                        return(evt);
                    }

                    evtHandler.Invoke(evt);
                }
                return(evt);
            }
            else
            {
                return(evt);
            }
        }