Skip to content

Commit

Permalink
Skip custom keybindings #960
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Aug 1, 2023
1 parent f32f70f commit fbdfdd2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
9 changes: 6 additions & 3 deletions app/AsusUSB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,13 +508,16 @@ public static void ApplyColor(Color color, bool init = false)
auraDevice.WriteFeatureData(LED_INIT3);
auraDevice.WriteFeatureData(LED_INIT4);
auraDevice.WriteFeatureData(LED_INIT5);
auraDevice.WriteFeatureData(PrepareAuraMessage(new byte[] { AURA_HID_ID, 0xbc, 1, 0, 0, 0 }));
auraDevice.WriteFeatureData(PrepareAuraMessage(new byte[] { AURA_HID_ID, 0xbc, 1, 1, 4, 0 }));

auraDevice.WriteFeatureData(new byte[] { AURA_HID_ID, 0xbc, 1, 0, 0 });
auraDevice.WriteFeatureData(new byte[] { AURA_HID_ID, 0xbc, 1, 1, 4 });
}

auraDevice.WriteFeatureData(new byte[] { AURA_HID_ID, 0xbc, 1, 0, 0 });
auraDevice.WriteFeatureData(msg);

} else
}
else
{
auraDevice.WriteFeatureData(AuraMessage(0, color, color, 0));
auraDevice.WriteFeatureData(MESSAGE_SET);
Expand Down
15 changes: 10 additions & 5 deletions app/Input/InputDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,19 @@ public void RegisterKeys()
if (keyProfile != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyProfile);
if (keyApp != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyApp);

hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeDown);
hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeUp);
hook.RegisterHotKey(ModifierKeys.Shift, Keys.VolumeDown);
hook.RegisterHotKey(ModifierKeys.Shift, Keys.VolumeUp);
if (!AppConfig.Is("skip_hotkeys"))
{
hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeDown);
hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeUp);
hook.RegisterHotKey(ModifierKeys.Shift, Keys.VolumeDown);
hook.RegisterHotKey(ModifierKeys.Shift, Keys.VolumeUp);
}

if (!AppConfig.ContainsModel("Z13"))
{
if (actionM1 is not null && actionM1.Length > 0) hook.RegisterHotKey(ModifierKeys.None, Keys.VolumeDown);
if (actionM2 is not null && actionM2.Length > 0) hook.RegisterHotKey(ModifierKeys.None, Keys.VolumeUp);
if (actionM2 is not null && actionM2.Length > 0) hook.RegisterHotKey(ModifierKeys.None, Keys.VolumeUp);
}

// FN-Lock group

Expand Down

0 comments on commit fbdfdd2

Please sign in to comment.