I wrote a macro to change / control the brightness of my monitor but it is not working (i.e., the brightness is not changing).
I tested the functionality / logic and noticed:
The macro triggers are firing properly.
The engine log was recording the event with multiple entries that read "2026-06-08 06:49:59 Execute macro “Single Brightness Action” from trigger Editor" with no error codes.
I then decided to get as basic as possible and built the below single action macro:
M2 here but on Sequoia. I can only get it to work (and it did work, as did Decrease Screen Brightness) in the Keyboard Maestro editor when I tap the Run button because it appears you didn't assign any trigger to it at all.
I have to say the screen display of the brightness bar is a bit confusing. At first I thought it wasn't working because nothing changed (not brighter, not more bars) but I was already at 100 percent brightness. Which is why I tried the Decrease action.
As noted the action is equivalent to the Simulate Hardware Key action pressing the key (optionally with the optionKey+shiftKey for quarter increase/decrease).
I tested it and it works fine on my MacBook running Tahoe.
It's interesting that it works with the actual keystroke but not the simulated keystroke - that makes me wonder if there is something on your Mac that is either implementing those keys specifically or interfering with the simulated keys.
You could try rebooting in Safe mode and seeing if that changes the behaviour, either of the physical keys or the Keyboard Maestro actions.
While I am far from an expert it appears (based on the above) that there is problem with the Apple Studio Display and in this regard:
a) Are you in agreement with my conclusion?
b) Is there a way that we can test this?
c) Is there anyone else on the forum with a 2026 Apple Studio Display that can test whether the Keyboard Maestro actions on their display?
d) What is different about the code behind the Keyboard Maestro actions that it does not work whereas the keyboard buttons and teh Terminal commands do work. @peternlewis, can you chime in here please?
Although I may be mistaken, it does appears that you have answered my main concern that there was something wrong with my Apple Studio Display monitors. The fact that you are getting the same results (Brightness actions and Simulate Hardware keystroke do not work) suggests that this is an Apple Studio Display design issue that is not unique to my displays. Should you disagree, please let me know.
Can you please expand on how you concluded and what you mean by the "AppleScript code tells me neither Script Editor nor Terminal are allowed to send keystrokes" other than the obvious (i.e., Script Editor says you cannot do it).
It is fair or reasonable to conclude that whatever is blocking Script Editor and Terminal from sending keystrokes is similarly blocking teh Keyboard Maestro actions?
That said, it is curious that the brightness buttons work!
These are AppleScript commands, so try them as plain AppleScript in an "Execute an AppleScript" Action and also the osascript version you posted in an "Execute a Shell Script" Action. If either of those work, that'll be your workround.
But this certainly seems like a Studio Display issue, not a KM one. Has this ever worked for you? If so, what's changed since? Are you still running other utilities that faff with your Studio Display, and might they be interfering?
Appreciate the suggestion (though I am still interested in what Peter found that says that AppleScript commands cannot be sent).
It is strange but the AppleScript commands that I posted in Image 3 above work perfectly when run in a Keyboard Maestro Execute AppleScript action, both the increase (key code 144) and the decrease (key code 145).
The question is, why do the Keyboard Maestro Brightness actions and Simulate Hardware keystroke actions not work? Hopefully Peter can assist.
Yes, I recall it working with my previous Apple Studio Display but not the new one, that is all that has changed.
Yes, I do have other software but I stripped it out when I had the problem to make sure it was not the other software, same problem so not the other software.
It will also be interesting whether these data points will result in a fix to the Keyboard Maestro actions. It will likely have to wait until tomorrow given the time difference, it is now evening for Peter.
Agreed, it was a big purchase that I stressed over!
Confused and interesting at the same time that I am not getting any error messages. I just ran it again and got no error message in either the Editor log, Engine log, or Terminal (the I run it outside of Keyboard Maestro).
Apologies and fair, I should have been more precise.
I should have written, It is fair or reasonable to conclude that whatever is blocking Script Editor and Terminal from sending keystrokes to control the brightness (in your case) is similarly blocking the Keyboard Maestro brightness actions?
Hmmm, I wonder whether the culprit is displays that connect as Apple Native (i.e., DisplayServices) rather than DDC? How does your LG display connect?
Would love to figure this out -- just curious, even though I do have a workaround.