Using external monitors more seemlessly

Hi, I have some questions about using external monitors with a mac, can you please help?

I just set up an external monitor to use with my MacBook and the external monitor is several feet away from the MacBook. The monitor is several feet away at a standing desk while the MacBook is at a sitting desk, so I use a separate keyboard and trackpad when using this monitor. The monitors are not in mirrored mode by the way and I want them to work as separate monitors

I'm running into inconveniences where some basic functionalities that i use often are showing up on the monitor that I am not currently looking at and want to make it work more smoothly. There are four basic functionalities where I want to make it so that it works on whichever monitor I'm currently looking at:

The Cmd+Tab window switch

The Mac Dock

Alfred

Launchbar

Is there any way to make it so that these always show up on the correct monitor that I'm looking at?

Is there any way to automate it so that whenever I am using a specific keyboard/trackpad it automatically shows these on the correct monitor? I feel like this would be the easiest and best solution.

Or if that's not possible, is there any way to program a keyboard shortcut or midi based macro to change them to the correct monitor manually?

Also, is there any way to make it so that new windows launch on whichever monitor I'm currently using? I often use Alfred or Launchbar to open up a new app, and that new app often opens on the monitor that i'm not currently looking at.

Thanks,

Dan

Well, the first thing we have to establish is that there is no way for the Mac to know " whichever monitor I'm currently looking at". But if you mean which monitor has focus, then yes, that can be done. Most, if not all, auto-display windows will display on the monitor that has focus, meaning the monitor for which the Apple Menu Bar is displayed as active/enabled.

AFAIK, there is no command or API that will set the focus to a specific monitor. To control that, you have to click on a window, or desktop, of the monitor. EDIT: I have found a method using Desktop Spaces that may work.

Please review and test the below Macro to see if it will work for you.
You will need to make changes to the Macro, and maybe to your System Preferences for Mission Control. See Macro Release Notes for details.

The way you use this Macro is to trigger it IF the wrong Monitor currently has focus. The Macro will move the focus to the other Monitor.

I believe (hope) that by changing the Monitor which has focus will solve most, if not all, of your requests. In either case, let us know how it works for you.

MACRO: Move Focus to Other Monitor [Example]

Thank you.

The menu bar shows on both of my monitors at all times. But the dock only shows on one monitor which is what I'm guessing you mean by the monitor in focus?

Is there any way for the Mac or Keyboard Maestro to know which keyboard/trackpad that I'm using? If this is possible then I think it would help solve the issue every time.

I just tried implementing the macro that you linked and am confused about what this part means. Can you please clarify? Where/how do i set "the Keyboard Shortcut you have set in System Preferences for each Desktop"?

  • REVIEW/CHANGE THE FOLLOWING MACRO ACTIONS:
    (all shown in the magenta color)
    • This Macro uses four Desktop Spaces, with a MAIN and ALT for each Monitor
      • Change Each of the "Type KeyStroke" Actions to use the Keyboard Shortcut you have set in System Preferences for each Desktop
    • TBD
      • DESC

Isn't the menu bar on one of the monitors showed in a dimmed, "greyed-out" state?
I'm running macOS 10.14.6 (Mojave), and here's what it looks look on my system:

Active Monitor That has Focus
image

Other Monitor
image

The Mac Dock does NOT show on either of my monitors because I have it set to "auto-hide"

Yes, but it is possible for the mouse to be moved to the monitor that is NOT currently the monitor that has focus. My macro does NOT relay on the mouse location.

Goto System Preferences > Keyboard > Shortcuts > Mission Control

You may have to create the "MAIN" and "ALT" Desktops for each monitor if they do not appear there. On my Mac, Desktops 1 & 2 are for Monitor 1 "Main" & "Alt"; and Desktops 3 & 4 are for Monitor 2 "Main" and "Alt".

For more info see: How to Use Multiple Desktops (Spaces) .

Now, whatever shortcuts you assigned here, use the same shortcut in the corresponding Type a Keystroke Action:

Does that clear things up?

Thank you. That does clear some things up but am still confused about some of it.

Yes mine looks the same.

How can the Mac or Keyboard Maestro to know which keyboard/trackpad that I'm using? Is there an action, macro, or a trigger for this in Keyboard Maestro?

I'm not sure what you mean by most of these two sentences or how it relates to the question. I wasn't asking about moving the mouse to a different monitor, that might be helpful at some point but was asking if Keyboard Maestro could know which trackpad/keyboard I'm using so that it could automatically execute the macro without me having to manually execute a macro every time that I switch between using different keyboard/trackpad. Also, by 'relay' mouse location, do you mean move the mouse location to the other monitor?

A few questions here:

  1. If I'm only using 2 monitors, do i need to use the "main" and "alt" desktops? What function would these "main" and "alt" desktops serve if I'm only using two monitors? For seperate desktops/spaces on each monitor (ie when you have an app in full screen mode and then use Mission control or a 4 finger side swipe on the trackpad to go into the next "virtual" desktop on the same monitor)?

  2. If its not necessary to use the "main" and "alt" monitors then what do i do with the parts in the macro for them? Disable them?

  3. If i do need to create additional desktops, then do I do this by entering mission control and hitting the + button in the top right corner of mission control?

  4. Why do I need to deal with these desktops in the first place? It seems like it adds extra complexity and abstraction that could cause the system to mess up if i ever add or remove a 'virtual' desktop, and it would be simpler if I could just have the mac/Keyboard Maestro know which of the two monitors I am currently looking at (based on which keyboard/trackpad I'm using) without involving the 'virtual desktop spaces' at all. Is that possible or is using these desktop spaces the only way that it can work right now?

KM does NOT know, and does not need to know, which device you are using for a mouse. All KM can do is move and click the mouse pointer, regardless of which device is in use.

Well, I have two monitors myself. When I switch to an app on a particular monitor, I generally want the mouse pointer to be on the same monitor as the app. Don't you want this?

Already asked and answered above.

I don't understand your question. If you have two devices attached that control the mouse pointer, they both control the same, and only, pointer. The only way KM might know which device you are using is if the device has a button on it you can press. You can set a KM trigger on a USB Device Key trigger.

The reason that I used Desktops is because in general you may not have any windows opened on particular monitor.

Let me refresh a statement I made earlier:

So, again:

  1. KM can NOT know which monitor you are looking at
  2. KM can NOT know which pointer device you are using, unless you press a button on that device

I have read and reread you OP and it is still fuzzy to me exactly what you want to do.
I gave you a macro that will move the focus from one monitor to the other. But it has to be triggered by something. How would you expect KM to know which monitor you now want to use?

You can either trigger my macro with a hotkey, or with a USB Device Key on the pointer device you now want to use.

So, until we have a clear understanding between us on these points, there is not point in going further.

Does this now make sense to you?