mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-05-31 06:02:18 -06:00
### Added/improved functionality - Added proper support for controlling Apple displays. - Added option to show/hide brightness slider. - Added option to show brightness slider for internal display and apple displays (enabled by default). - Replication of built-in and Apple display brightness to corresponding brightness slider. - Added suffix to similarly named displays for better differentiation. - Option to disable slider snapping for finer control + disable slider snapping by default. - Added option to show slider tick marks for better accuracy. - Added option to use window focus instead of mouse to determine which display to control. - Ctrl+Command+Brightness now controls external displays only (Ctrl+Brightness continues to control internal display only) - Added separate tab for menu options. - Added option to restore last saved values upon startup. - Added option for audio device name matching for display volume control selection. - Separated option to change all screens for brightness and volume. - Added option for keyboard fine scale for brightness. - Added option for keyboard fine scale for volume. - Added version check upon startup for mandatory preferences reset upon downgrade or incompatible previous version + notification about this. - Added implementation for Command+F1 macOS shortcut to enable/disable mirroring. - Added safer 'Assume last saved settings are valid' option as default instead of startup DDC read (or restore). - Streamlined preference panes, 'Show advanced settings' now affect all tabs. This leads to a better and safer first timer experience (especially because of the influx of many new features). - Added a Quit button to Preferences if menu is hidden (it was not passible to quit the application until this time in this mode only by re-enabling the menu). - Lowered default first-run volume DDC default from 75% to 15% if read is not possible or disabled to prevent unexpectedly loud sound. - Added slider skew setting on a per control basis to have the ability to manipulate DDC slider balance and OSD scale if display control is not linear. - Added the ability to set min. and max. DDC bounds on a per display, per control basis. - Audio device name override option for a display (manually assign a specific audio device to a display). - Advanced setting to invert DDC control range (some displays have the scale reversed). - Advanced setting to remap DDC control code (some displays have contrast and brightness mixed up). - Ability to mark a DDC control as available or unavailable in advanced settings under Displays. - Ability to automatically hide menu icon if there is no slider present in the menu. - Option to show slider percentage for more precision. - Option to set combined or separate OSD scale when combined hardware+software brightness is used. - Apple like smooth brightness change (both for software, hardware, mixed and DisplayServices). - Added support for DisplayLink, AirPlay, Sidecar, screen sharing etc. using window shades (this is an inferior technique to the existing software implementation - gamma control - but still better than nothing). Disabled for any kind of mirroring setups. _(Only on Big Sur and above)_ - Brightness change synchronisation from Built-In and Apple displays to other displays. This makes Touch Bar, Ambient light sensor, Control Center and System Preferences induced changes affect all displays. Synchronisation uses a sophisticated indirect delta method + the user can intervene and adjust individual screen brightness at any time to easily compensate mismatching native brightness levels. - Preferences pane tab selector has a simpler look on Catalina. - All menu sliders are now scrollable using a magic mouse/trackpad swipes or mouse wheel. - Added option for menu to show only items that are relevant to display which shows the menu currently. - Added option to enable combined sliders (note: this option combined with enabled Apple/built-in display syncing and enabled 'change all' keyboard settings finally provides full synchronised control of all displays). - Combined sliders can now display multiple displays when keyboard and brightness syncing is not enabled. _(Only on Big Sur and above)_ - Redesigned sliders to look like Big Sur/Monterey Control Center's sliders. _(Only on Big Sur and above)_ - Quit and Preferences... are now icons for a much cleaner look. _(Only on Big Sur and above)_ - Added option to change additional menu options style or hide them. _(Only on Big Sur and above)_ - Multiple displays are now in nice Big Sur styled blocks - no more ugly separators. _(Only on Big Sur and above)_ - Added customisable gamma/ddc switchover point for combined brightness in the advanced section of Displays. - Added comma separated list for control code override to enable edge cases like controlling Brightness and Contrast at the same time (use VCP list entry `10, 12` for that) - Contrast can now be controlled from keyboard via <kbd>control</kbd> + <kbd>option</kbd> + <kbd>command</kbd> + brightness up/down. - Custom keyboard shortcuts for brightness, contrast, volume and mute - Added automatic update. ### Other under the hood changes and bug fixes - Standardised internal scale among various displays and DDC ranges for ranged controls. - Uses the new internal scale for combined hardware-software brightness mode. - Migrated scales to internal float representation to prevent loss of fine detail on transformations. - Fixed double sound when muting multiple external displays at the same time. - Fixed lack of initial volume configuration if slider is not shown in menu. - Fixed wrong settings being applied to a display when replaced on Apple Silicon (UserDefaults preferences are now tied to specific display strings instead of CGDirectDisplayID - which is no longer semi-unique on arm64). - A lot of refactoring, streamlining and general optimisations.
172 lines
5.1 KiB
Swift
172 lines
5.1 KiB
Swift
// Copyright © MonitorControl. @JoniVR, @theOneyouseek, @waydabber and others
|
|
|
|
enum Command: UInt8 {
|
|
case none = 0
|
|
|
|
// Display Control
|
|
case horizontalFrequency = 0xAC
|
|
case verticalFrequency = 0xAE
|
|
case sourceColorCoding = 0xB5
|
|
case displayUsageTime = 0xC0
|
|
case displayControllerId = 0xC8
|
|
case displayFirmwareLevel = 0xC9
|
|
case osdLanguage = 0xCC
|
|
case powerMode = 0xD6
|
|
case imageMode = 0xDB
|
|
case vcpVersion = 0xDF
|
|
|
|
// Geometry
|
|
case horizontalPosition = 0x20
|
|
case horizontalSize = 0x22
|
|
case horizontalPincushion = 0x24
|
|
case horizontalPincushionBalance = 0x26
|
|
case horizontalConvergenceRB = 0x28
|
|
case horizontalConvergenceMG = 0x29
|
|
case horizontalLinearity = 0x2A
|
|
case horizontalLinearityBalance = 0x2C
|
|
case verticalPosition = 0x30
|
|
case verticalSize = 0x32
|
|
case verticalPincushion = 0x34
|
|
case verticalPincushionBalance = 0x36
|
|
case verticalConvergenceRB = 0x38
|
|
case verticalConvergenceMG = 0x39
|
|
case verticalLinearity = 0x3A
|
|
case verticalLinearityBalance = 0x3C
|
|
case horizontalParallelogram = 0x40
|
|
case verticalParallelogram = 0x41
|
|
case horizontalKeystone = 0x42
|
|
case verticalKeystone = 0x43
|
|
case rotation = 0x44
|
|
case topCornerFlare = 0x46
|
|
case topCornerHook = 0x48
|
|
case bottomCornerFlare = 0x4A
|
|
case bottomCornerHook = 0x4C
|
|
case horizontalMirror = 0x82
|
|
case verticalMirror = 0x84
|
|
case displayScaling = 0x86
|
|
case windowPositionTopLeftX = 0x95
|
|
case windowPositionTopLeftY = 0x96
|
|
case windowPositionBottomRightX = 0x97
|
|
case windowPositionBottomRightY = 0x98
|
|
case scanMode = 0xDA
|
|
|
|
// Miscellaneous
|
|
case degauss = 0x01
|
|
case newControlValue = 0x02
|
|
case softControls = 0x03
|
|
case activeControl = 0x52
|
|
case performancePreservation = 0x54
|
|
case inputSelect = 0x60
|
|
case ambientLightSensor = 0x66
|
|
case remoteProcedureCall = 0x76
|
|
case displayIdentificationOnDataOperation = 0x78
|
|
case tvChannelUpDown = 0x8B
|
|
case flatPanelSubPixelLayout = 0xB2
|
|
case displayTechnologyType = 0xB6
|
|
case displayDescriptorLength = 0xC2
|
|
case transmitDisplayDescriptor = 0xC3
|
|
case enableDisplayOfDisplayDescriptor = 0xC4
|
|
case applicationEnableKey = 0xC6
|
|
case displayEnableKey = 0xC7
|
|
case statusIndicator = 0xCD
|
|
case auxiliaryDisplaySize = 0xCE
|
|
case auxiliaryDisplayData = 0xCF
|
|
case outputSelect = 0xD0
|
|
case assetTag = 0xD2
|
|
case auxiliaryPowerOutput = 0xD7
|
|
case scratchPad = 0xDE
|
|
|
|
// Audio
|
|
case audioSpeakerVolume = 0x62
|
|
case speakerSelect = 0x63
|
|
case audioMicrophoneVolume = 0x64
|
|
case audioJackConnectionStatus = 0x65
|
|
case audioMuteScreenBlank = 0x8D
|
|
case audioTreble = 0x8F
|
|
case audioBass = 0x91
|
|
case audioBalanceLR = 0x93
|
|
case audioProcessorMode = 0x94
|
|
|
|
// OSD/Button Event Control
|
|
case osd = 0xCA
|
|
|
|
// Image Adjustment
|
|
case sixAxisHueControlBlue = 0x9F
|
|
case sixAxisHueControlCyan = 0x9E
|
|
case sixAxisHueControlGreen = 0x9D
|
|
case sixAxisHueControlMagenta = 0xA0
|
|
case sixAxisHueControlRed = 0x9B
|
|
case sixAxisHueControlYellow = 0x9C
|
|
case sixAxisSaturationControlBlue = 0x5D
|
|
case sixAxisSaturationControlCyan = 0x5C
|
|
case sixAxisSaturationControlGreen = 0x5B
|
|
case sixAxisSaturationControlMagenta = 0x5E
|
|
case sixAxisSaturationControlRed = 0x59
|
|
case sixAxisSaturationControlYellow = 0x5A
|
|
case adjustZoom = 0x7C
|
|
case autoColorSetup = 0x1F
|
|
case autoSetup = 0x1E
|
|
case autoSetupOnOff = 0xA2
|
|
case backlightControlLegacy = 0x13
|
|
case backlightLevelWhite = 0x6B
|
|
case backlightLevelRed = 0x6D
|
|
case backlightLevelGreen = 0x6F
|
|
case backlightLevelBlue = 0x71
|
|
case blockLutOperation = 0x75
|
|
case clock = 0x0E
|
|
case clockPhase = 0x3E
|
|
case colorSaturation = 0x8A
|
|
case colorTemperatureIncrement = 0x0B
|
|
case colorTemperatureRequest = 0x0C
|
|
case contrast = 0x12
|
|
case displayApplication = 0xDC
|
|
case fleshToneEnhancement = 0x11
|
|
case focus = 0x1C
|
|
case gamma = 0x72
|
|
case grayScaleExpansion = 0x2E
|
|
case horizontalMoire = 0x56
|
|
case hue = 0x90
|
|
case luminance = 0x10
|
|
case lutSize = 0x73
|
|
case screenOrientation = 0xAA
|
|
case selectColorPreset = 0x14
|
|
case sharpness = 0x87
|
|
case singlePointLutOperation = 0x74
|
|
case stereoVideoMode = 0xD4
|
|
case tvBlackLevel = 0x92
|
|
case tvContrast = 0x8E
|
|
case tvSharpness = 0x8C
|
|
case userColorVisionCompensation = 0x17
|
|
case velocityScanModulation = 0x88
|
|
case verticalMoire = 0x58
|
|
case videoBlackLevelBlue = 0x70
|
|
case videoBlackLevelGreen = 0x6E
|
|
case videoBlackLevelRed = 0x6C
|
|
case videoGainBlue = 0x1A
|
|
case videoGainGreen = 0x18
|
|
case videoGainRed = 0x16
|
|
case windowBackground = 0x9A
|
|
case windowControlOnOff = 0xA4
|
|
case windowSelect = 0xA5
|
|
case windowSize = 0xA6
|
|
case windowTransparency = 0xA7
|
|
|
|
// Preset Operations
|
|
case restoreFactoryDefaults = 0x04
|
|
case restoreFactoryLuminanceContrastDefaults = 0x05
|
|
case restoreFactoryGeometryDefaults = 0x06
|
|
case restoreFactoryColorDefaults = 0x08
|
|
case restoreFactoryTvDefaults = 0x0A
|
|
case settings = 0xB0
|
|
|
|
// Manufacturer Specific
|
|
case blackStabilizer = 0xF9 // LG 38UC99-W
|
|
case colorPresetC = 0xE0
|
|
case powerControl = 0xE1
|
|
case topLeftScreenPurity = 0xE8
|
|
case topRightScreenPurity = 0xE9
|
|
case bottomLeftScreenPurity = 0xEA
|
|
case bottomRightScreenPurity = 0xEB
|
|
|
|
public static let brightness = luminance
|
|
}
|