I'm trying to register the NSMouseMoved event globally using this line of code:
[NSEvent addGlobalMonitorForEventsMatchingMask:NSMouseMoved handler:mouseMovedBlock];
However, my mouseMovedBlock only gets called when the mouse gets clicked and not when the mouse is moved. I tried detecting the type of the NSEvent and it returns NSMouseUp, which doesn't really make any sense.
Why is my program acting so strange / what did I miss?