Offset Group Palette from Mouse Position

I came up with this when answering a question on the Forum and it's been so useful to me since that I wanted to share in this Tips section.

There is an option to make a Keyboard Maestro Palette appear here: "Place palette under mouse"

But the problem is that this is usually not a good position when you're working (having the center of the Palette right where the mouse is and covering what you are looking at). What would be more useful would be to have the Palette appear near the mouse position.

My solution to this has been to set the Macro Group with the Palette up like this:

Shows/Hides Palette when
Leave hot key unchecked
Place palette under mouse checked


Then I make a new Macro with a hot key to do three things:

  1. Moves the mouse a certain distance from where it currently is
  2. Shows/hides the Palette
  3. Moves the mouse exactly back to where it was before the Palette was called.


The exact positioning numbers can be played with until you get the offset you want. All that matters is that the negative numbers in the third action down cancel out the numbers in the first Action.

It all happens so fast you don't see the mouse pointer move and in effect the Palette pops up near but not under the mouse.

Screen Recording 2022-02-15 at 12.38.51-Animated GIFF 640 12fps

@peternlewis Feature Request - the above works well but is a few steps to set up. It would be really good if the option "Place palette under mouse" could have an offset option for the reasons I mentioned above.



Your code looks useful.

Still, palettes are something I've generally avoided all these years because, well, I don't know. It's just a feature that doesn't enter my mindset when solving a problem. Eventually I'll come around and then I'll go palette crazy.

1 Like

I like it! A lot simpler than my AppleScript. :laughing:

@Sleepy I used to use palettes for a LOT of stuff... then I got away from them when I got my Stream Deck... but then I discovered opening palettes via BTT's gesture, so now I have a macro that opens the palette for whatever the front application is via a single BTT gesture on my Trackpad. (I have a couple other gestures that open Global Palette and other things). I gotta say, it's very nice to be able to just gesture on my trackpad and have the front app's palette open up.

I still use my Stream Deck for a lot of common things or if my hand isn't currently on my trackpad but it's nice to have options. :grin:

1 Like

Noted, but this is not likely to happen.

1 Like

Thanks Peter. Yes, I knew it was a long shot to actually have this built-in but wanted to include the request for completeness.

I use palettes all the time, but I treat them like extensions of whatever app I'm working on. Here's an example (it's a small image, but you get the idea):