public override void KeyDown(NSEvent theEvent) { var keyArgs = theEvent.ToXwtKeyEventArgs(); context.InvokeUserCode(delegate { eventSink.OnKeyPressed(keyArgs); }); if (keyArgs.Handled) { return; } var textArgs = new PreviewTextInputEventArgs(theEvent.Characters); if (!String.IsNullOrEmpty(theEvent.Characters)) { context.InvokeUserCode(delegate { eventSink.OnPreviewTextInput(textArgs); }); } if (textArgs.Handled) { return; } base.KeyDown(theEvent); }
public override void KeyDown(NSEvent theEvent) { Context.InvokeUserCode(delegate { EventSink.OnKeyPressed(theEvent.ToXwtKeyEventArgs()); }); base.KeyDown(theEvent); }
public override void KeyUp (NSEvent theEvent) { var keyArgs = theEvent.ToXwtKeyEventArgs (); context.InvokeUserCode (delegate { eventSink.OnKeyReleased (keyArgs); }); if (!keyArgs.Handled) base.KeyUp (theEvent); }
public override bool PerformKeyEquivalent(NSEvent theEvent) { var popupHandled = SendKeyPressed(theEvent.ToXwtKeyEventArgs()); if (popupHandled) { return(true); } return(base.PerformKeyEquivalent(theEvent));; }
public override void KeyUp(NSEvent theEvent) { if (cachedCursorPosition != SelectedRange.Location) { cachedCursorPosition = SelectedRange.Location; Context.InvokeUserCode(delegate { EventSink.OnSelectionChanged(); EventSink.OnKeyReleased(theEvent.ToXwtKeyEventArgs()); }); } base.KeyUp(theEvent); }
public static bool HandleKeyUp(this ICellRenderer cell, NSEvent theEvent) { if (cell.Backend.GetIsEventEnabled(WidgetEvent.KeyReleased)) { cell.Backend.Load(cell); cell.CellContainer.SetCurrentEventRow(); var keyArgs = theEvent.ToXwtKeyEventArgs(); cell.Backend.Context.InvokeUserCode(() => cell.Backend.EventSink.OnKeyReleased(keyArgs)); return(keyArgs.Handled); } return(false); }
public override void KeyDown(NSEvent theEvent) { var key = theEvent.ToXwtKeyEventArgs().Key; if ((key == Key.Return || key == Key.Space) && Clicked != null) { Clicked(this, EventArgs.Empty); } else { base.KeyDown(theEvent); } }
public override bool PerformKeyEquivalent(NSEvent theEvent) { var popupHandled = SendKeyPressed(theEvent.ToXwtKeyEventArgs()); LogMessage($"Popup handled {popupHandled}"); if (popupHandled) { return(true); } var baseHandled = base.PerformKeyEquivalent(theEvent);; LogMessage($"Base handled {baseHandled}"); return(baseHandled); }
public override bool PerformKeyEquivalent(NSEvent theEvent) { var popupHandled = SendKeyPressed(theEvent.ToXwtKeyEventArgs()); LogMessage($"Popup handled {popupHandled}"); if (popupHandled) { return(true); } var baseHandled = base.PerformKeyEquivalent(theEvent);; LogMessage($"Base handled {baseHandled}"); LogMessage($"First Reponder {NSApplication.SharedApplication?.KeyWindow?.FirstResponder}"); LogMessage($"Refuses First Responder {RefusesFirstResponder}"); LogMessage($"Editor chain {CurrentEditor}"); return(baseHandled); }
public override void KeyDown(NSEvent theEvent) { var keyArgs = theEvent.ToXwtKeyEventArgs (); context.InvokeUserCode (delegate { eventSink.OnKeyPressed (keyArgs); }); if (keyArgs.Handled) return; var textArgs = new PreviewTextInputEventArgs (theEvent.Characters); if (!String.IsNullOrEmpty(theEvent.Characters)) context.InvokeUserCode (delegate { eventSink.OnPreviewTextInput (textArgs); }); if (textArgs.Handled) return; base.KeyDown (theEvent); }
public static bool HandleKeyDown(this IViewObject view, NSEvent theEvent) { if (view == null) { throw new ArgumentNullException(nameof(view)); } if (theEvent == null) { throw new ArgumentNullException(nameof(theEvent)); } if (view.View == null) { throw new InvalidOperationException(); } var keyArgs = theEvent.ToXwtKeyEventArgs(); view.Backend.ApplicationContext.InvokeUserCode(delegate { view.Backend.EventSink.OnKeyPressed(keyArgs); }); if (keyArgs.Handled) { return(true); } var textArgs = new TextInputEventArgs(theEvent.Characters); if (!String.IsNullOrEmpty(theEvent.Characters)) { view.Backend.ApplicationContext.InvokeUserCode(delegate { view.Backend.EventSink.OnTextInput(textArgs); }); } if (textArgs.Handled) { return(true); } return(false); }
public static bool HandleKeyUp(this IViewObject view, NSEvent theEvent) { if (view == null) { throw new ArgumentNullException(nameof(view)); } if (theEvent == null) { throw new ArgumentNullException(nameof(theEvent)); } if (view.View == null) { throw new InvalidOperationException(); } var keyArgs = theEvent.ToXwtKeyEventArgs(); view.Backend.ApplicationContext.InvokeUserCode(delegate { view.Backend.EventSink.OnKeyReleased(keyArgs); }); return(keyArgs.Handled); }
public override bool PerformKeyEquivalent (NSEvent theEvent) { var popupHandled = SendKeyPressed (theEvent.ToXwtKeyEventArgs ()); LogMessage ($"Popup handled {popupHandled}"); if (popupHandled) return true; var baseHandled = base.PerformKeyEquivalent (theEvent);; LogMessage ($"Base handled {baseHandled}"); return baseHandled; }
public override bool PerformKeyEquivalent (NSEvent theEvent) { var popupHandled = SendKeyPressed (theEvent.ToXwtKeyEventArgs ()); if (popupHandled) return true; return base.PerformKeyEquivalent (theEvent);; }
public override bool PerformKeyEquivalent(NSEvent theEvent) { return(SendKeyPressed(theEvent.ToXwtKeyEventArgs()) || base.PerformKeyEquivalent(theEvent)); }
public override bool PerformKeyEquivalent (NSEvent theEvent) { var popupHandled = SendKeyPressed (theEvent.ToXwtKeyEventArgs ()); LogMessage ($"Popup handled {popupHandled}"); if (popupHandled) return true; var baseHandled = base.PerformKeyEquivalent (theEvent);; LogMessage ($"Base handled {baseHandled}"); LogMessage ($"First Reponder {NSApplication.SharedApplication?.KeyWindow?.FirstResponder}"); LogMessage ($"Refuses First Responder {RefusesFirstResponder}"); LogMessage ($"Editor chain {CurrentEditor}"); return baseHandled; }
public override bool PerformKeyEquivalent (NSEvent theEvent) { return SendKeyPressed (theEvent.ToXwtKeyEventArgs ()) || base.PerformKeyEquivalent (theEvent); }