mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
MicMute Toggle for external hotkey https://github.com/seerge/g-helper/issues/3127
This commit is contained in:
@@ -282,7 +282,7 @@ namespace GHelper.Input
|
||||
KeyboardHook.KeyPress(Keys.VolumeUp);
|
||||
return;
|
||||
case Keys.F4:
|
||||
KeyProcess("m3");
|
||||
ToggleMic();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -313,7 +313,7 @@ namespace GHelper.Input
|
||||
HandleEvent(126); // Emojis
|
||||
return;
|
||||
case Keys.F9:
|
||||
KeyProcess("m3"); // MicMute
|
||||
ToggleMic(); // MicMute
|
||||
return;
|
||||
case Keys.F10:
|
||||
HandleEvent(133); // Camera Toggle
|
||||
@@ -414,7 +414,7 @@ namespace GHelper.Input
|
||||
{
|
||||
if (e.Key == keyProfile) modeControl.CyclePerformanceMode();
|
||||
if (e.Key == keyApp) Program.SettingsToggle();
|
||||
if (e.Key == Keys.F20) KeyProcess("m3");
|
||||
if (e.Key == Keys.F20) ToggleMic();
|
||||
}
|
||||
|
||||
if (e.Modifier == (ModifierKeys.Control | ModifierKeys.Shift | ModifierKeys.Alt))
|
||||
@@ -567,9 +567,7 @@ namespace GHelper.Input
|
||||
ToggleFnLock();
|
||||
break;
|
||||
case "micmute":
|
||||
bool muteStatus = Audio.ToggleMute();
|
||||
Program.toast.RunToast(muteStatus ? Properties.Strings.Muted : Properties.Strings.Unmuted, muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
||||
if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed");
|
||||
ToggleMic();
|
||||
break;
|
||||
case "brightness_up":
|
||||
SetBrightness(true);
|
||||
@@ -602,6 +600,14 @@ namespace GHelper.Input
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void ToggleMic()
|
||||
{
|
||||
bool muteStatus = Audio.ToggleMute();
|
||||
Program.toast.RunToast(muteStatus ? Properties.Strings.Muted : Properties.Strings.Unmuted, muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
||||
if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed");
|
||||
}
|
||||
|
||||
static bool GetTouchpadState()
|
||||
{
|
||||
using (var key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\Status", false))
|
||||
|
||||
Reference in New Issue
Block a user