I disable the menu bar for my application, so when the window is opened, there is no menu on the left top. Right now i want to do the below action:
for example:
when my window is in front of the window of "Chrome", then when i focus on my window, the menu bar still show the "Chrome"'s menu. Now i want to transfer the short cut event to the chrome when my window is activate, i tried to input "command + Q" but it has no action. So how can i do this pragmatically?
monitor = NSEvent.addGlobalMonitorForEvents(matching: mask, handler: handler)