0

I have an App that handles files dropped into the window using the Swift Drag-and-Drop mechanism. I would like to implement whenever the user starts dragging an object outside my app, that my UI will update and show "Drop here" view. However, as far as I know, there is no way to do it.

I tried adding a listener to the left mouse drag:

NSEvent.addGlobalMonitorForEvents(matching: .leftMouseDragged, handler: changeHanler)

But this method is fired every time the user moves the mouse with its left key clicked even if he doesn't really dragging anything.

Is it even possible to do it?

Thank you.

2
  • Trying to achieve the exact same thing. Have you been able to solve this?
    – Stephan
    Commented Oct 14, 2022 at 1:45
  • Not yet. If I'll find out I will let you know Commented Oct 14, 2022 at 14:20

0