Skip to content

Commit b493a42

Browse files
vtnskoyama-tadayoshiJoniVR
authored
Add a setting to control the function of F14 / F15 keys (MonitorControl#602)
Co-authored-by: koyama <[email protected]> Co-authored-by: JoniVR <[email protected]>
1 parent a1615b7 commit b493a42

File tree

21 files changed

+110
-28
lines changed

21 files changed

+110
-28
lines changed

MonitorControl/AppDelegate.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
5454
self.statusItem.menu = self.statusMenu
5555
self.checkPermissions()
5656
CGDisplayRegisterReconfigurationCallback({ _, _, _ in app.displayReconfigured() }, nil)
57+
58+
MediaKeyTap.useAlternateBrightnessKeys = prefs.bool(forKey: Utils.PrefKeys.altBrightnessKeys.rawValue)
5759
self.updateDisplays(firstrun: true)
5860
}
5961

MonitorControl/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>$(MARKETING_VERSION)</string>
2121
<key>CFBundleVersion</key>
22-
<string>3095</string>
22+
<string>3103</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.utilities</string>
2525
<key>LSMinimumSystemVersion</key>

MonitorControl/Support/Utils.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ class Utils: NSObject {
9292
/// Change Brightness/Volume for all screens
9393
case allScreens
9494

95+
/// Use F14 / F15 keys to control brightness
96+
case altBrightnessKeys
97+
9598
/// Friendly name changed
9699
case friendlyName
97100

MonitorControl/Support/de.lproj/Localizable.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"Safe Mode Activated" = "Safe Mode Activated";
6969

7070
/* Shown in the alert dialog */
71-
"Shift was pressed during launch. MonitorControl started in safe mode. Default preferences are reloaded, DDC read is blocked." = "Die Shift-Taste wurde beim Programmstart gehalten. MonitorControl wurde im Safe Mode gestartet. Die Standard-Einstellungen werden geladen, DDC lesen ist blockiert.";
71+
"Shift was pressed during launch. MonitorControl started in safe mode. Default preferences are reloaded, DDC read is blocked." = "Shift was pressed during launch. MonitorControl started in safe mode. Default preferences are reloaded, DDC read is blocked.";
7272

7373
/* Shown in the alert dialog */
7474
"Shortcuts not available" = "Kurzbefehle sind nicht verfügbar";

MonitorControl/UI/Base.lproj/Main.storyboard

Lines changed: 40 additions & 25 deletions
Large diffs are not rendered by default.

MonitorControl/UI/de.lproj/Main.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
/* Class = "NSButtonCell"; title = "Change Brightness and Volume for all screens"; ObjectID = "E6M-ih-S8Y"; */
3535
"E6M-ih-S8Y.title" = "Helligkeit und Lautstärke für alle Bildschirme ändern";
3636

37+
/* Class = "NSButtonCell"; title = "Enable F14 / F15 keys for Brightness Control"; ObjectID = "E6M-ih-SZY"; */
38+
"E6M-ih-SZY.title" = "Enable F14 / F15 keys for Brightness Control";
39+
3740
/* Class = "NSMenuItem"; title = "Minimal"; ObjectID = "Eq3-z9-yIo"; */
3841
"Eq3-z9-yIo.title" = "Minimal";
3942

MonitorControl/UI/en.lproj/Main.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
/* Class = "NSButtonCell"; title = "Change Brightness and Volume for all screens"; ObjectID = "E6M-ih-S8Y"; */
3535
"E6M-ih-S8Y.title" = "Change Brightness and Volume for all screens";
3636

37+
/* Class = "NSButtonCell"; title = "Enable F14 / F15 keys for Brightness Control"; ObjectID = "E6M-ih-SZY"; */
38+
"E6M-ih-SZY.title" = "Enable F14 / F15 keys for Brightness Control";
39+
3740
/* Class = "NSMenuItem"; title = "Minimal"; ObjectID = "Eq3-z9-yIo"; */
3841
"Eq3-z9-yIo.title" = "Minimal";
3942

MonitorControl/UI/es-419.lproj/Main.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
/* Class = "NSButtonCell"; title = "Change Brightness and Volume for all screens"; ObjectID = "E6M-ih-S8Y"; */
3535
"E6M-ih-S8Y.title" = "Cambiar el brillo y volumen para todas las pantallas";
3636

37+
/* Class = "NSButtonCell"; title = "Enable F14 / F15 keys for Brightness Control"; ObjectID = "E6M-ih-SZY"; */
38+
"E6M-ih-SZY.title" = "Enable F14 / F15 keys for Brightness Control";
39+
3740
/* Class = "NSMenuItem"; title = "Minimal"; ObjectID = "Eq3-z9-yIo"; */
3841
"Eq3-z9-yIo.title" = "Minimal";
3942

MonitorControl/UI/fr.lproj/Main.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
/* Class = "NSButtonCell"; title = "Change Brightness and Volume for all screens"; ObjectID = "E6M-ih-S8Y"; */
3535
"E6M-ih-S8Y.title" = "Change Brightness and Volume for all screens";
3636

37+
/* Class = "NSButtonCell"; title = "Enable F14 / F15 keys for Brightness Control"; ObjectID = "E6M-ih-SZY"; */
38+
"E6M-ih-SZY.title" = "Enable F14 / F15 keys for Brightness Control";
39+
3740
/* Class = "NSMenuItem"; title = "Minimal"; ObjectID = "Eq3-z9-yIo"; */
3841
"Eq3-z9-yIo.title" = "Minimal";
3942

MonitorControl/UI/hu.lproj/Main.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
/* Class = "NSButtonCell"; title = "Change Brightness and Volume for all screens"; ObjectID = "E6M-ih-S8Y"; */
3535
"E6M-ih-S8Y.title" = "Fényerő/hangerő módosítása az összes képernyőn";
3636

37+
/* Class = "NSButtonCell"; title = "Enable F14 / F15 keys for Brightness Control"; ObjectID = "E6M-ih-SZY"; */
38+
"E6M-ih-SZY.title" = "Enable F14 / F15 keys for Brightness Control";
39+
3740
/* Class = "NSMenuItem"; title = "Minimal"; ObjectID = "Eq3-z9-yIo"; */
3841
"Eq3-z9-yIo.title" = "Minimális";
3942

0 commit comments

Comments
 (0)