Skip to content

Commit

Permalink
Added XGM toggle hotkey #3437
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Dec 11, 2024
1 parent 9698e91 commit c639199
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Input/InputDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class InputDispatcher
public static Keys keyProfile2 = (Keys)AppConfig.Get("keybind_profile_2", (int)Keys.F16);
public static Keys keyProfile3 = (Keys)AppConfig.Get("keybind_profile_3", (int)Keys.F19);
public static Keys keyProfile4 = (Keys)AppConfig.Get("keybind_profile_4", (int)Keys.F20);
public static Keys keyXGM = (Keys)AppConfig.Get("keybind_xgm", (int)Keys.F21);

static ModeControl modeControl = Program.modeControl;
static ScreenControl screenControl = new ScreenControl();
Expand Down Expand Up @@ -142,6 +143,7 @@ public void RegisterKeys()
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, keyProfile2);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, keyProfile3);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, keyProfile4);
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, keyXGM);

hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeDown);
hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeUp);
Expand Down Expand Up @@ -438,6 +440,7 @@ public void KeyPressed(object sender, KeyPressedEventArgs e)
if (e.Key == keyProfile2) modeControl.SetPerformanceMode(2, true);
if (e.Key == keyProfile3) modeControl.SetPerformanceMode(3, true);
if (e.Key == keyProfile4) modeControl.SetPerformanceMode(4, true);
if (e.Key == keyXGM) Program.settingsForm.gpuControl.ToggleXGM(true);

switch (e.Key)
{
Expand Down

0 comments on commit c639199

Please sign in to comment.