diff --git a/README.md b/README.md index 7d7cf53..db91c8b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ working across different projects via [VisualMode](https://www.visualmode.dev/). For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter). -_1895 TILs and counting..._ +_1896 TILs and counting..._ See some of the other learning resources I work on: @@ -793,6 +793,7 @@ If you've learned something here, support my efforts writing daily TILs by - [Reveal Location Of File In Finder.app](mac/reveal-location-of-file-in-finder-app.md) - [Run A Hardware Check](mac/run-a-hardware-check.md) - [Run AppleScript Commands Inline In The Terminal](mac/run-applescript-commands-inline-in-the-terminal.md) +- [Send Click To Another Window Without Losing Focus](mac/send-click-to-another-window-without-losing-focus.md) - [Set A Window To Its Default Zoom Level](mac/set-a-window-to-its-default-zoom-level.md) - [Set Default Search Directory For Finder](mac/set-default-search-directory-for-finder.md) - [Specify App When Opening From Command Line](mac/specify-app-when-opening-from-command-line.md) diff --git a/mac/send-click-to-another-window-without-losing-focus.md b/mac/send-click-to-another-window-without-losing-focus.md new file mode 100644 index 0000000..33450eb --- /dev/null +++ b/mac/send-click-to-another-window-without-losing-focus.md @@ -0,0 +1,25 @@ +# Send Click To Another Window Without Losing Focus + +This is a fun trick for MacOS -- you can `Cmd+Click` on a window that is out of +focus to send a click to that window without transitioning focus from the +current window to that one. Put another way, you can click-through on an +inactive window without changing the active window. + +Let's say I have my [logseq](https://logseq.com/) notes window focused. In the +background is a Chrome window that I'm referencing as I type notes. However +there is a pop up obscuring the Chrome window. Typically to dismiss that pop up, +I'd have to click on Chrome once just to transition focus to Chrome. Then I +would have to click the `x` to dismiss the pop-up. Then I would have to click +back on the logseq window to transition focus back to it. + +Instead, I can hold down `cmd` as I click on the `x` in Chrome. The click will +get sent through to Chrome dismissing the pop up and logseq will remain the +focused window. That's one click instead of three. + +I wish I could remember where I learned this trick so that I could give credit. +I have a feeling it might have been [Justin Searls](https://justin.searls.co/) +though. And I unfortunately cannot find any official Apple documentation on +this. + +One thing to note is that while this will probably work across most apps, I +believe it can be overridden by certain apps that implement custom UIs.