Documentation
¶
Overview ¶
Package keyboard controls Apple Silicon MacBook keyboard backlight brightness via the private CoreBrightness.framework (KeyboardBrightnessClient).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client controls the keyboard backlight via CoreBrightness.
func NewClient ¶
NewClient loads CoreBrightness.framework and creates a KeyboardBrightnessClient. The keyboardID is typically 1 for the built-in keyboard.
func (*Client) GetBrightness ¶
GetBrightness returns the current keyboard backlight brightness (0.0–1.0).
func (*Client) SetAutoBrightness ¶
SetAutoBrightness enables or disables auto-brightness for the keyboard.
func (*Client) SetBrightness ¶
SetBrightness sets the keyboard backlight brightness (0.0–1.0) with a fade duration in milliseconds.
func (*Client) SetIdleDimTime ¶
SetIdleDimTime sets the idle dim timeout in seconds. Set to 0 to disable.
func (*Client) SuspendIdleDimming ¶
SuspendIdleDimming suspends or resumes idle dimming.