Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

shtuceron

macrumors newbie
Original poster
Dec 22, 2009
16
0
I am sorry for stupid question, but how use addGlobalMonitorForEventsMatchingMask method?? Can you get me some project where using this method.
Thanks.
 

shtuceron

macrumors newbie
Original poster
Dec 22, 2009
16
0
yes i looked. May be i dont understand right,
addLocalMonitorForEventsMatchingMask:handler: - method which get event (example key press) into our program, addGlobalMonitorForEventsMatchingMask:handler: - method which get event from other application and 'pass' it into our program (even our application is not active)??

addLocalMonitorForEventsMatchingMask - work, addGlobalMonitorForEventsMatchingMask - not working, therefore i asked you send me project where this method work.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
What do you mean by "doesn't work"? Remember that for example a key event would only be sent to the active application, so it would be recognised by a _local_ monitor in the active application, and by a _global_ monitor in any other (inactive) application.
 

shtuceron

macrumors newbie
Original poster
Dec 22, 2009
16
0
OK, _local_ monitor and _global_ monitor this is abstract name or no, never i doesn't work with event, and don't understand you fully
 

Alkiera

macrumors regular
Mar 11, 2008
109
0
OK, _local_ monitor and _global_ monitor this is abstract name or no, never i doesn't work with event, and don't understand you fully

I think he means you will never see the same event in both monitors. If your application is currently in focus, clicks/keys will register on the local monitor. If it is not the focused application, they will register with the global monitor.
 

shtuceron

macrumors newbie
Original poster
Dec 22, 2009
16
0
This discussion is very useful for me, but the problem is not solution addLocalMonitorForEventsMatchingMask is work, the applicaton is active, addGlobalMonitorForEventsMatchingMask not working, may be you get me some example code, project where using addGlobalMonitorForEventsMatchingMask.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.