2

When I try to find out how to do various things on macOS, there are often mentions online as well as on this site of various pieces of software that do this. More rarely, I am able to find mentions of the actual lower level system settings that affect those options.

As an example: I wanted to enable back/forward mouse buttons on a Bluetooth mouse and in my search came upon this question:

For an inexplicable reason, the accepted answer links to a piece of software which, while open source and allows one to dig through the code, nevertheless takes several thousand lines of code to do what is possible by directly setting two preferences available by the OS itself. In an answer to the same question above: https://superuser.com/a/1692202/109976

On Linux, any lower level preferences are documented in the kernel source, man pages, and the specific software used. On Windows there's https://learn.microsoft.com where I've yet to find some internal piece that wasn't documented, even if the first search results don't necessarily point to said site.

On the other hand, when I search for anything on regarding macOS, I rarely am able to find any authoritative sources of information - it's almost always some blog or another or a site as Super User which at best lists some instructions with no explanation, and as often as not points to some piece of software that affects the customization. As often as not, closed source.

I must be searching in all the wrong places! Are there any official sources for e.g. options one can affect with “defaults?” Just to have a concrete goal:

$ defaults read com.apple.driver.AppleHIDMouse
{
    Button1 = 1;
    Button2 = 1;
    Button3 = 1;
    Button4 = 1;
    Button4Click = 0;
    Button4Force = 0;
    ButtonDominance = 1;
    ScrollH = 1;
    ScrollS = 4;
    ScrollSSize = 30;
    ScrollV = 1;
}

Is there an official document listing what each of these does? To be clear, some of these are pretty obvious after some experimentation - I'm not interested in an explanation of them here, I'm interested in an explanation from an official source!

If no such source exists, what is the process by which people find out about possible settings and what these do?

Giacomo1968
  • 55,001
Shwouchk
  • 236
  • This is a very good question and I too would like to know if there is an equivalent resource to those used by Linux and Windows for macOS/Darwin. – Giacomo1968 Jan 08 '24 at 05:04

1 Answers1

1

Defaults are just preferences stored as arbitrary name-type-value triplets, known as "properties" in "property list" .plist files (XML-based). The "defaults" command could almost be renamed "plistedit".

There's no way to know what properties an app or other piece of software might look for, what types they should be, and how potential values would be interpreted, other that inspecting the source code for that software.

Some parts of macOS are open source, so you could inspect the source code for those parts, but there's no easy way to find out what closed-source parts of macOS do with their preferences properties outside of what Apple has documented publicly.

Spiff
  • 104,423
  • Thank you for your answer. However, is there a place where at least some of these are documented publicly? I have yet to see official docs to any plist. – Shwouchk Jan 08 '24 at 08:22
  • @Shwouchk Unfortunately, there isn't (https://apple.stackexchange.com/questions/212152/defaults-documentation-for-builtin-apps). There was an attempt to crowd-source them, but the project hasn't seen updates for years. – nohillside Jan 08 '24 at 08:52
  • Looks like my question is somewhat of a duplicate then. – Shwouchk Jan 08 '24 at 09:07