mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Custom keybinding for mode toggle
This commit is contained in:
@@ -122,7 +122,6 @@ public class ASUSWmi
|
||||
private const uint GENERIC_WRITE = 0x40000000;
|
||||
private const uint OPEN_EXISTING = 3;
|
||||
private const uint FILE_ATTRIBUTE_NORMAL = 0x80;
|
||||
private const uint FILE_FLAG_OVERLAPPED = 0x40000000;
|
||||
private const uint FILE_SHARE_READ = 1;
|
||||
private const uint FILE_SHARE_WRITE = 2;
|
||||
|
||||
@@ -172,7 +171,7 @@ public class ASUSWmi
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
IntPtr.Zero,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
IntPtr.Zero
|
||||
);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.63</AssemblyVersion>
|
||||
<AssemblyVersion>0.64</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
@@ -90,8 +90,13 @@ namespace GHelper
|
||||
unRegPowerNotify = NativeMethods.RegisterPowerSettingNotification(ds, settingGuid.ConsoleDisplayState, NativeMethods.DEVICE_NOTIFY_WINDOW_HANDLE);
|
||||
|
||||
// CTRL + SHIFT + F5 to cycle profiles
|
||||
var ghk = new KeyHandler(KeyHandler.SHIFT | KeyHandler.CTRL, Keys.F5, ds);
|
||||
ghk.Register();
|
||||
Keys keybind_profile = (config.getConfig("keybind_profile") != -1) ? (Keys)config.getConfig("keybind_profile") : Keys.F5;
|
||||
if (keybind_profile != 0)
|
||||
{
|
||||
var ghk = new KeyHandler(KeyHandler.SHIFT | KeyHandler.CTRL, keybind_profile, ds);
|
||||
ghk.Register();
|
||||
}
|
||||
|
||||
|
||||
if (Environment.CurrentDirectory.Trim('\\') == Application.StartupPath.Trim('\\') || action.Length > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user