mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-05-15 14:15:55 -06:00
[GH-ISSUE #439] Remap controls (swap brightness and contrast) #354
Labels
No labels
Status: Abandoned
arm64
beta
beta
bug
done
duplicate
enhancement
feedback needed from reporter
in progress
invalid
investigating
known Issue
monitor Issue
pull-request
translation
unable to reproduce
unreleased
x86
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/MonitorControl#354
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fruitofgeorge on GitHub (May 10, 2021).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/439
Originally assigned to: @waydabber on GitHub.
Checklist
Describe the issue
On my particular monitor the controls for brightness and contrast are swapped.
Expected behavior
The brightness setting to adjust the brightness and the contrast setting to adjust the contrast.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I can still adjust to the brightness I want by using the contrast slider and adjust to the contrast I want by using the brightness slider. But the annoying part is there is only a keyboard shortcut for brightness which actually adjusts the contrast for my display. I wish I could use the keyboard to adjust the brightness instead.
Environment Information (please complete the following information):
@fruitofgeorge commented on GitHub (Jun 22, 2021):
Finally had time to look into this further. Unfortunately the problem is baked into the display firmware. Going into the menu settings on the display itself, the brightness setting adjusts the contrast and the contrast setting adjusts the brightness. Is it possible to give the option for the key shortcuts to adjust "contrast" instead of brightness?
@fruitofgeorge commented on GitHub (Jul 30, 2021):
I see there was an update pushed but still no response to this. Can we get the option to adjust contrast with the key shortcuts?
@waydabber commented on GitHub (Aug 2, 2021):
Hey @fruitofgeorge - I don't think this will be resolved since this is such a special case (the display obviously has a faulty firmware) and it it would be difficult to redo everything to have this as an option.
What I would recommend is that you download the source code and simply swap every occurence of the
.brightnessto.contrastand vice versa (but do not change other things like.brightnessDownetc) and then build the app. This custom will solve your problem.Hope this helps!
@fruitofgeorge commented on GitHub (Aug 2, 2021):
I grabbed the source code but I can't open the xcode project because it's in a format too new for the latest version of xcode I can run (10.1)
I thought having contrast as a key shortcut would have utility for more people than just this instance but whatever.
@waydabber commented on GitHub (Aug 3, 2021):
Why don't you pull an older version of the code (from 2017)? That will surely work with XCode 10.1. For your needs that will perfectly suffice - more recent additions like Bug Sur stuff and M1 compatibility is not relevant in your case anyway.
Changing the contrast with key shortcut is unlikely to be very useful unfortunatelly. I generally think that changing the contrast on a back-lit display is a bad idea anyway (one should find the proper calibrated contrast - this point is usually when the pure white does not get "whiter" when adjusting contrast on the display and stick to that) and MonitorControl should sunset this option and have the ability to change gamma/contrast/brightness via software if needed as a fallback option or beyond the lowest brightness setting or in case of OLED (and maybe some mini-led or FALD) displays.
@fruitofgeorge commented on GitHub (Aug 3, 2021):
I found an older version and spent hours in xcode trying to fix the bevy of errors and figuring out how to sign the stupid thing to get the original code to build. Now I look to swap the brightness and contrast and there are zero instances of
.brightnessor.contrast. I'm at a loss of which parameters to modify now.@waydabber commented on GitHub (Aug 3, 2021):
Lol. Yeah, probably that version worked differently (did not use DDC.swift but ddcctl). I think you should look for
BRIGHTNESSand change it toCONTRAST.See the constants for the possible DDC commands in this file:
d11c3f4a63/DDC.h@fruitofgeorge commented on GitHub (Aug 4, 2021):
Easy peasy huh? A whole day wasted and I can't get any past version to actually build and run properly --before-- I even try to change any of the source code. I hate xcode.
@fruitofgeorge commented on GitHub (Aug 25, 2021):
So I'm still working on this. Things looked hopeful but theres a problem with the code in
InternalDisplay.swiftXcode gives a warning that result of call to 'sync(execute:)' is unused and an error that it's missing return in a function expected to return 'Float'.
Any ideas?
@waydabber commented on GitHub (Aug 25, 2021):
Hi,
this part of the code is managing the internal built-in display's brightness. If you don't have such a thing, then you can simply replace the code inside the function with a single
return 0.@fruitofgeorge commented on GitHub (Aug 26, 2021):
Finally got it behaving the way it should! Thanks for your help.
@waydabber commented on GitHub (Aug 26, 2021):
Amazing! Congratulations! :)
@waydabber commented on GitHub (Sep 14, 2021):
Hey, the upcoming 3.1.0 (available in the
3.1.0branch already) will have an option to remap standard controls to whatever DDC control you want.See screenshots of the implementation in the v3.1.0 preliminary discussion.
In the advanced section if you enter the value
12(the control code for contrast control) to theVCP 0xcolumn for Brightness in Displays/Advanced, then the brightness slider will control contrast.Note: there is a problem though, the version will not run on 10.13 due to several incompatibilites with the code :(
@fruitofgeorge commented on GitHub (Sep 15, 2021):
That's really cool! Hopefully folks will find it useful.
Sadly I can't go higher than high sierra without getting a new graphics card which won't happen soon. But my custom build has been working great.
@waydabber commented on GitHub (Sep 15, 2021):
Amazing, I am happy for it. There are less more satisfying than building something with hard work and then see it working. :)