mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-05-15 14:15:55 -06:00
Merge 622cfb481b into 3cfc40598a
This commit is contained in:
commit
2ca71d16ed
4 changed files with 8 additions and 3 deletions
|
|
@ -212,4 +212,5 @@ enum KeyboardVolume: Int {
|
|||
case custom = 1
|
||||
case both = 2
|
||||
case disabled = 3
|
||||
case mediaForce = 4
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class MediaKeyTapManager: MediaKeyTapDelegate {
|
|||
if [KeyboardBrightness.media.rawValue, KeyboardBrightness.both.rawValue].contains(prefs.integer(forKey: PrefKey.keyboardBrightness.rawValue)) {
|
||||
keys.append(contentsOf: [.brightnessUp, .brightnessDown])
|
||||
}
|
||||
if [KeyboardVolume.media.rawValue, KeyboardVolume.both.rawValue].contains(prefs.integer(forKey: PrefKey.keyboardVolume.rawValue)) {
|
||||
if [KeyboardVolume.media.rawValue, KeyboardVolume.both.rawValue, KeyboardVolume.mediaForce.rawValue].contains(prefs.integer(forKey: PrefKey.keyboardVolume.rawValue)) {
|
||||
keys.append(contentsOf: [.mute, .volumeUp, .volumeDown])
|
||||
}
|
||||
// Remove brightness keys if no external displays are connected, but only if brightness fine control is not active
|
||||
|
|
@ -166,8 +166,8 @@ class MediaKeyTapManager: MediaKeyTapDelegate {
|
|||
let keysToDelete: [MediaKey] = [.brightnessUp, .brightnessDown]
|
||||
keys.removeAll { keysToDelete.contains($0) }
|
||||
}
|
||||
// Remove volume related keys if audio device is controllable
|
||||
if let defaultAudioDevice = app.coreAudio.defaultOutputDevice {
|
||||
// Remove volume related keys if audio device is controllable (skip when user chose force-capture mode)
|
||||
if prefs.integer(forKey: PrefKey.keyboardVolume.rawValue) != KeyboardVolume.mediaForce.rawValue, let defaultAudioDevice = app.coreAudio.defaultOutputDevice {
|
||||
let keysToDelete: [MediaKey] = [.volumeUp, .volumeDown, .mute]
|
||||
if prefs.integer(forKey: PrefKey.multiKeyboardVolume.rawValue) == MultiKeyboardVolume.audioDeviceNameMatching.rawValue {
|
||||
if DisplayManager.shared.updateAudioControlTargetDisplays(deviceName: defaultAudioDevice.name) == 0 {
|
||||
|
|
|
|||
|
|
@ -1004,6 +1004,7 @@
|
|||
<menu key="menu" id="LhY-cM-Msq">
|
||||
<items>
|
||||
<menuItem title="Standard keyboard volume and mute keys" state="on" id="1sy-Kd-WL5"/>
|
||||
<menuItem title="Standard keys (force capture)" tag="4" id="fVk-mR-9Xp"/>
|
||||
<menuItem title="Custom keyboard shortcuts" tag="1" id="4CG-0I-anB"/>
|
||||
<menuItem title="Both standard and custom shortcuts" tag="2" id="QDG-SA-mRX">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
|
|
|
|||
|
|
@ -415,5 +415,8 @@
|
|||
/* Class = "NSButtonCell"; title = "Show percentages"; ObjectID = "ZUu-MR-XwA"; */
|
||||
"ZUu-MR-XwA.title" = "Show percentages";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Standard keys (force capture)"; ObjectID = "fVk-mR-9Xp"; */
|
||||
"fVk-mR-9Xp.title" = "Standard keys (force capture)";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Combined dimming switchover point:"; ObjectID = "zv8-pZ-OPy"; */
|
||||
"zv8-pZ-OPy.title" = "Combined dimming switchover point:";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue