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); }
public override void OnKeyUp(DKey key, DModifiers modifiers) { foreach (Component component in subComponents) { if (component.focused) { component.OnKeyUp(key, modifiers); } } }
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); }
public virtual void OnKeyPressed(DKey key, DModifiers modifiers) { }
public virtual void OnKeyUp(DKey key, DModifiers modifiers) { }