Reposition a Keyboard Maestro palette



Move a Keyboard Maestro (6.6 KB)

Custom Keyboard Maestro Plug-in


  • Move a named Keyboard Maestro palette


  • 0.2
    • Updated to bring the moved palette to the front, so that it acts as the anchor if the move is followed by its companion plugin Tile all open KM palettes


  • Changes the X and or Y position of the named palette
  • (X, Y) values are (across, down) in pixels


  • Yosemite
    • The core script is mainly written in Javascript for Applications


  • Name of palette
    • The global palette can be referred to as Global or Keyboard Maestro
    • Group and other palettes should be specifed exactly as spelled (case-sensitive) in their title bars
  • New X position:
    • Integer: pixels across (left edge of palette)
    • (or left blank to change only vertical position)
  • New Y position
    • Integer: pixels down (top edge of palette)
    • (or left blank to change only horizontal position)


  • Drag the .zip file onto the Keyboard Maestro icon in the OS X toolbar.
  • (if updating a previous version of the action, first manually remove the previous copy from the custom actions folder)
    • ~/Library/Application Support/Keyboard Maestro/Keyboard Maestro Actions


osascript -l JavaScript <<JXA_END 2>/dev/null
(function (strPaletteName, X, Y) {
	var dctReturn = {};
	if (!strPaletteName) {
		dctReturn.message = "Palette name not specified";
	} else {
		if (strPaletteName.toLowerCase() === 'global') strPaletteName =
			'Keyboard Maestro';
		var appSE = Application('System Events'),
			lstProc = appSE.applicationProcesses.where({
				name: 'Keyboard Maestro Engine'
			procKMEngine = lstProc.length ? lstProc[0] : null,
			oWin =,
			lstXY, lstDXY;

		try {
			lstXY = oWin.position();
			oWin.position = [X || lstXY[0], Y || lstXY[1]];
			lstDXY = oWin.position();
			dctReturn.message = (strPaletteName === 'Keyboard Maestro' ?
					'Global' : strPaletteName) +
				' palette moved to ' + lstDXY;
			dctReturn.x = lstDXY[0];
			dctReturn.y = lstDXY[1];
		} catch (e) {
			dctReturn.message = 'Palette not open, or not found as spelled: ' +
	return JSON.stringify(dctReturn, null, 2);

Position of Global Macro Palette
Controlling position of Global or Group Palette

Awesome, thanks. Can’t wait to try it out. Mind if I share it on my blogsite?


Of course – feel free


See also:

Get the current position of a Keyboard Maestro palette

I’ve just updated this action (in the first post of this thread) See the installation notes for the details of how to install a new version.

( Essentially, it now brings the moved window to the foreground, which enables it to act as the anchor palette for a related tiling action )

Tile all open KM palettes horizontally or vertically

@ComplexPoint, any chance you could update this plugin again to make it work with KM8.2.4 and Mojave? I drag the .zip file onto the KM menu icon and nothing happens. Thanks


It seems to be working here – I attach a fresh zip:

Move a Keyboard Maestro (6.6 KB)

At what point does it seem to be failing ?

Once you have installed it by dropping it on the KM icon, it should show up in the 3rd party plugins folder of the action-adding dialog:


and become available for inclusion in your macros.


Thanks. I see it now. I didn’t know where it was suppose to go, and I couldn’t tell if it was installed. All is good now. It looks like it is exactly what I need. I will give it a test run. Thanks for creating it.


Got it working. Thank you, thank you, thank you. It does exactly what I need.