コード例 #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)
 {
 }