diff options
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs index d3f01e8..c2f50b7 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs @@ -30,8 +30,20 @@ namespace Xamarin.PropertyEditing.Mac if (Popover == null) return; - if (!Popover.Shown) + if (!Popover.Shown) { Popover.Show (new CGRect (26, this.Frame.Height / 2 - 2, 2, 2), this, NSRectEdge.MinYEdge); + Window.MakeFirstResponder (Popover); + } + } + + public override void KeyDown (NSEvent theEvent) + { + if (theEvent.KeyCode == 36 || theEvent.KeyCode == 49) { + MouseDown (theEvent); + } + else { + base.KeyDown (theEvent); + } } } |