Send a bang to activate Live's main window and setting the keyboard focus to it. As there seems to be no way to open a m4l patcher window without stealing the focus, this can help to manually reset the focus after the window is open.
Please check out the M4L device in the zip to get started.
- activate the Ableton Live app even if another app is active
- switch keyboard focus back to Live's main window when a subwindow has the focus eg.: M4L patcher window, VST window, ...
- remember the window that currently has the focus and later reset the focus to this window
- it doesn't work in the M4L editor, only when the device is running in Live
This prototype really has to be seen as experimental. The problem was identifying the main window of the Live app. On Mac, I'm using the first window of the app's window list. This always seems to be the main window but Apple's Appkit documentation states: "There is no guarantee of the order of the windows in the array. " That means it has to be tested by more people. I'm happy to get your feedback.