Пример #1
0
        internal static void DWindowOnKeyUp(object sender, KeyboardKeyEventArgs e)
        {
            DKey       key       = (DKey)e.Key;
            DModifiers modifiers = new DModifiers(e.Shift, e.Control, e.Alt);

            rootCanvas.OnKeyUp(key, modifiers);
            OnKeyUp?.Invoke(key, modifiers);
        }
Пример #2
0
 public override void OnKeyUp(DKey key, DModifiers modifiers)
 {
     foreach (Component component in subComponents)
     {
         if (component.focused)
         {
             component.OnKeyUp(key, modifiers);
         }
     }
 }
Пример #3
0
        internal static void DWindowOnKeyDown(object sender, KeyboardKeyEventArgs e)
        {
            DKey       key       = (DKey)e.Key;
            DModifiers modifiers = new DModifiers(e.Shift, e.Control, e.Alt);

            if (!e.IsRepeat)
            {
                rootCanvas.OnKeyPressed(key, modifiers);
                OnKeyPress?.Invoke(key, modifiers);
            }
            rootCanvas.OnKeyDown(key, modifiers);

            OnKeyDown?.Invoke(key, modifiers);
        }
Пример #4
0
 public virtual void OnKeyPressed(DKey key, DModifiers modifiers)
 {
 }
Пример #5
0
 public virtual void OnKeyUp(DKey key, DModifiers modifiers)
 {
 }