Hammerspoon / hammerspoon

Staggeringly powerful macOS desktop automation with Lua
http://www.hammerspoon.org
MIT License
11.97k stars 581 forks source link

Some actions not updated in System Preferences #2436

Open pedrorrivero opened 4 years ago

pedrorrivero commented 4 years ago

Some actions performed through the API do take effect but never get reflected on either System Preferences, or the scroll bar on a MacBook with touchbar. I have found these ones so far:

Furthermore, some states such as the input muted state get overwritten when an app is launched (e.g. Facetime).

latenitefilms commented 4 years ago

I got around this by using hs.eventtap.event.newSystemKeyEvent() instead for volume/brightness up/down.

pedrorrivero commented 4 years ago

Thank you @latenitefilms! Does it work for every keyboard layout though? Also, Volume seems to work just fine with the regular API call.

latenitefilms commented 4 years ago

Yes, I believe so. It definitely works on my MacBook Pro (15-inch, 2017), which doesn't have a dedicated volume/brightness button, and also still works if I connect an external keyboard.

von commented 4 years ago

Possibly related: one thing I ran into setting screen saver options and having them reflected in the Preferences panel was the need to killall cfprefsd per https://superuser.com/a/914884