Mac: Remove mouse check for key events

This commit is contained in:
Ben Olden-Cooligan 2024-04-07 13:14:13 -07:00
parent c3e2ae0333
commit d41e9f0046

View File

@ -148,8 +148,7 @@ public class MacEtoPlatform : EtoPlatform
var view = control.ToNative();
var monitor = NSEvent.AddLocalMonitorForEventsMatchingMask(NSEventMask.KeyDown, evt =>
{
if (ReferenceEquals(evt.Window, view.Window) &&
view.HitTest(evt.LocationInWindow) != null!)
if (ReferenceEquals(evt.Window, view.Window))
{
var args = evt.ToEtoKeyEventArgs();
return handle(args.KeyData) ? null! : evt;