This commit is contained in:
Serge
2023-12-16 11:07:56 +01:00
parent e8d0030444
commit bc8084f3e0
2 changed files with 17 additions and 2 deletions

View File

@@ -634,13 +634,19 @@ namespace GHelper.Input
{
case 16: // FN+F7
if (Control.ModifierKeys == Keys.Shift)
SetScreenpad(-10);
{
if (AppConfig.IsDUO()) SetScreenpad(-10);
else Program.settingsForm.BeginInvoke(Program.settingsForm.CycleMatrix, -1);
}
else
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Down, "Brightness");
break;
case 32: // FN+F8
if (Control.ModifierKeys == Keys.Shift)
SetScreenpad(10);
{
if (AppConfig.IsDUO()) SetScreenpad(10);
else Program.settingsForm.BeginInvoke(Program.settingsForm.CycleMatrix, 1);
}
else
Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Brightness_Up, "Brightness");
break;

View File

@@ -761,6 +761,15 @@ namespace GHelper
}
public void CycleMatrix(int delta)
{
comboMatrix.SelectedIndex = Math.Min(Math.Max(0, comboMatrix.SelectedIndex + delta), comboMatrix.Items.Count - 1);
AppConfig.Set("matrix_brightness", comboMatrix.SelectedIndex);
matrixControl.SetMatrix();
Program.toast.RunToast(comboMatrix.GetItemText(comboMatrix.SelectedItem), delta > 0 ? ToastIcon.BacklightUp : ToastIcon.BacklightDown);
}
public void CycleAuraMode()
{
if (comboKeyboard.SelectedIndex < comboKeyboard.Items.Count - 1)