2

I have a seemingly common problem where when I dock my MacBook Pro in clamshell mode to my Thunderbolt 4 dock with 2 external displays, the displays are sometimes "flipped" meaning the left display shows up on the right, and vice versa. As a result, if I try to move my cursor from one display to the other, it gets "stuck" in the middle. The only way to fix this is to go into my System Preferences and flip the display arrangement on the Displays page. It's fine, but it's annoying. Is there a way to assign a keyboard shortcut to flip the display arrangement?

3
  • It's fine to answer your own question, & accept it as correct, but you need to split it into clear question and answer sections. [This may sound an odd thing to insist on if you're not used to Stack Exchange, but for future hits from google searchers this & some nice upvotes will prime google to bring your QA to the top.] As it stands, it's likely to be closed. Please take the time to take the Tour and read the Help pages, including Can I answer my own question?
    – Tetsujin
    Feb 6 at 16:11
  • Fixed! Hope it can stay up, this post would have saved me so much time.
    – maxdoes
    Feb 6 at 16:22
  • 1
    Looks good. Have some welcome points :)
    – Tetsujin
    Feb 6 at 16:24

1 Answer 1

2

Here is the solution I have found!

  1. Open Terminal

  2. Install brew

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

  3. Install displayplacer

    brew tap jakehilborn/jakehilborn && brew install displayplacer

  4. Install iCanHazShortcut

    brew install icanhazshortcut

  5. Use macOS System Preferences to put displays in “correct” arrangement (System Preferences > Displays)

  6. Use displayplacer to get “correct” display arrangement arguments using Terminal

    displayplacer list

(scroll to bottom)

displayplacer "id:AB3507C3-C84E-4F19-9CC8-BA286B9FF967 res:1920x1080 hz:60 color_depth:7 scaling:on origin:(0,0) degree:0" "id:397A8EBB-E3B2-475D-8FF6-ED98E60B7B2C res:1920x1080 hz:60 color_depth:7 scaling:on origin:(1920,0) degree:0"

(This was mine, yours may be different.)

  1. Use macOS System Preferences to put displays in a “flipped” arrangement (System Preferences > Displays)

  2. Use displayplacer to get “flipped” display arrangement arguments using Terminal

    displayplacer list

(scroll to bottom)

displayplacer "id:AB3507C3-C84E-4F19-9CC8-BA286B9FF967 res:1920x1080 hz:60 color_depth:7 scaling:on origin:(0,0) degree:0" "id:397A8EBB-E3B2-475D-8FF6-ED98E60B7B2C res:1920x1080 hz:60 color_depth:7 scaling:on origin:(-1920,0) degree:0"

(Again, yours may be different.)

  1. Open iCanHazShortcut and create a new shortcut for display arrangement #1. In the Command field, copy/paste the “correct” display arrangement arguments from above, replacing “displayplacer” with /opt/homebrew/Cellar/displayplacer/1.2.0/bin/displayplacer
  2. Choose a keyboard shortcut (I chose Cmd+Ctrl+Shift+1)
  3. Create a new shortcut for display arrangement #2. In the Command field, copy/paste the “flipped” display arrangement arguments from above, replacing “displayplacer” with /opt/homebrew/Cellar/displayplacer/1.2.0/bin/displayplacer
  4. Choose a keyboard shortcut (I chose Cmd+Ctrl+Shift+2)
  5. Test your setup. One keyboard shortcut should flip the displays so the cursor gets stuck in the middle. The other keyboard shortcut should put the displays in the correct arrangement and allow you to mouse the mouse freely between displays.

I hope this helps someone!

1
  • 1
    This works perfect, thank you!!
    – justnate
    Feb 24 at 1:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .