Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
30598d0
Add DevWinUI
ryanlua Oct 15, 2025
31719cc
Remove preset hotkey logic
ryanlua Oct 15, 2025
b0ea013
Use DevWinUI.Controls IsEnabledTextBlock
ryanlua Oct 15, 2025
15fe146
Remove control namespace
ryanlua Oct 15, 2025
8f592bf
Add shortcut control
ryanlua Oct 16, 2025
c011e0f
Fix alignment
ryanlua Oct 17, 2025
930be17
Fix sizing
ryanlua Oct 18, 2025
a5ccb12
Add hotkey debug
ryanlua Oct 20, 2025
3fec6cb
Update DevWinUI.Controls version to 9.2.0
ryanlua Oct 20, 2025
47ba12a
Remove alignment
ryanlua Oct 20, 2025
8b72010
Disable shortcut
ryanlua Oct 22, 2025
33271a2
Remove extra native method
ryanlua Oct 22, 2025
91b61c3
Fix window monitor
ryanlua Oct 22, 2025
e2fe84e
Add hotkey manager
ryanlua Oct 22, 2025
86209ed
Merge branch 'main' into shortcuts
ryanlua Oct 23, 2025
b9eb1da
Disable shortcut on toggle
ryanlua Oct 23, 2025
f8a434f
Update DevWinUI
ryanlua Oct 24, 2025
dbbb37b
Merge branch 'main' into shortcuts
ryanlua Nov 4, 2025
ee8e1a4
Update DevWinUI
ryanlua Nov 9, 2025
8f0c31d
Merge branch 'main' into devwinui
ryanlua Nov 9, 2025
e51e38b
Add DevWinUI dependency to settings
ryanlua Nov 9, 2025
0317a82
Merge branch 'main' into devwinui
ryanlua Nov 9, 2025
6f64208
Merge branch 'main' into devwinui
ryanlua Nov 15, 2025
b18d31a
Update packages
ryanlua Nov 15, 2025
ad798d1
Reset to default key
ryanlua Nov 18, 2025
b1d1e20
Add default hotkey
ryanlua Nov 18, 2025
0d61a8e
Merge branch 'main' into devwinui
ryanlua Apr 30, 2026
09c8537
Fix build
ryanlua Apr 30, 2026
9a55ea2
Fix or
ryanlua Apr 30, 2026
f9f4188
Add basic hotkey implementation
ryanlua May 1, 2026
719345c
Cleanup structure
ryanlua May 1, 2026
6c66fa4
Use PInvoke for message m
ryanlua May 1, 2026
204bc01
Keep monitor alive
ryanlua May 1, 2026
f491550
Remove start delay
ryanlua May 1, 2026
23889ca
Disable toggling auto clicker in settings
ryanlua May 1, 2026
60038cf
Cleanup codr
ryanlua May 1, 2026
fbdef6f
Remove hard coded hotk
ryanlua May 2, 2026
e16969c
Add basic hotkey implementation
ryanlua May 1, 2026
14da9cf
Cleanup structure
ryanlua May 1, 2026
df0dcdb
Use PInvoke for message m
ryanlua May 1, 2026
a614c1a
Keep monitor alive
ryanlua May 1, 2026
03ba0e4
Remove start delay
ryanlua May 1, 2026
786dbd2
Disable toggling auto clicker in settings
ryanlua May 1, 2026
80132e8
Cleanup codr
ryanlua May 1, 2026
56b6e21
Remove hard coded hotk
ryanlua May 2, 2026
815a429
Merge branch 'devwinui' of https://github.com/ryanlua/auraclick into …
ryanlua May 2, 2026
9bf349c
Fix using value for bool negation
ryanlua May 5, 2026
b750e8f
Fix monitor duplication
ryanlua May 5, 2026
d1683b2
Merge branch 'devwinui' of https://github.com/ryanlua/auraclick into …
ryanlua May 5, 2026
90d4f07
Redirect to HEAD commit
ryanlua May 5, 2026
0f6baf3
Add erroring for hotkeys
ryanlua May 5, 2026
68be708
Merge branch 'main' into devwinui
ryanlua May 5, 2026
189ca15
Update hotkey error dialog
ryanlua May 5, 2026
9aa53fb
Merge branch 'devwinui' of https://github.com/ryanlua/auraclick into …
ryanlua May 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AuraClick/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<ResourceDictionary Source="/Styles.xaml" />
<ResourceDictionary Source="ms-appx:///DevWinUI.Controls/Themes/Generic.xaml" />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
Expand Down
3 changes: 2 additions & 1 deletion AuraClick/AuraClick.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@
<ProjectCapability Include="Msix" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DevWinUI.Controls" Version="9.9.4" />
<PackageReference Include="CommunityToolkit.WinUI.Converters" Version="8.3.260402-preview2" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.275">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.3.260402-preview2" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.28000.1839" />
<PackageReference Include="Microsoft.WindowsAppSDK.WinUI" Version="2.0.12" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="2.0.1" />
<PackageReference Include="WinUIEx" Version="2.9.0" />
</ItemGroup>

Expand Down
89 changes: 0 additions & 89 deletions AuraClick/Controls/IsEnabledTextBlock/IsEnabledTextBlock.cs

This file was deleted.

35 changes: 0 additions & 35 deletions AuraClick/Controls/IsEnabledTextBlock/IsEnabledTextBlock.xaml

This file was deleted.

98 changes: 98 additions & 0 deletions AuraClick/Helpers/HotkeyManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// Copyright (C) 2026 Ryan Luu
//
// This file is part of Aura Click.
//
// Aura Click is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Aura Click is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Aura Click. If not, see <https://www.gnu.org/licenses/>.

using DevWinUI;
using Windows.System;
using Windows.Win32;
using Windows.Win32.Foundation;
using Windows.Win32.UI.Input.KeyboardAndMouse;
using WinRT.Interop;

namespace AuraClick.Helpers;

internal static class HotkeyManager
{
public static bool RegisterHotkey(int hotkeyId, IEnumerable<object>? keys)
{
if (!TryGetHotkey(keys, out var modifiers, out var virtualKey))
{
return false;
}

var hWnd = new HWND(WindowNative.GetWindowHandle(App.MainWindow));
UnregisterHotkey(hotkeyId);
return PInvoke.RegisterHotKey(hWnd, hotkeyId, ToWin32Modifiers(modifiers) | HOT_KEY_MODIFIERS.MOD_NOREPEAT, (uint)virtualKey);
}
Comment thread
ryanlua marked this conversation as resolved.

public static bool UnregisterHotkey(int hotkeyId)
=> PInvoke.UnregisterHotKey(new HWND(WindowNative.GetWindowHandle(App.MainWindow)), hotkeyId);

private static bool TryGetHotkey(IEnumerable<object>? keys, out VirtualKeyModifiers modifiers, out VirtualKey virtualKey)
{
modifiers = VirtualKeyModifiers.None;
virtualKey = VirtualKey.None;

if (keys is null)
{
return false;
}

foreach (var key in keys)
{
if (key is not KeyVisualInfo keyInfo || keyInfo.Key is not VirtualKey keyCode)
{
continue;
}

if (TryGetModifier(keyCode, out var modifier))
{
modifiers |= modifier;
}
else
{
virtualKey = keyCode;
}
}

return virtualKey != VirtualKey.None;
}

private static bool TryGetModifier(VirtualKey keyCode, out VirtualKeyModifiers modifier)
{
modifier = keyCode switch
{
VirtualKey.Control or VirtualKey.LeftControl or VirtualKey.RightControl => VirtualKeyModifiers.Control,
VirtualKey.Shift or VirtualKey.LeftShift or VirtualKey.RightShift => VirtualKeyModifiers.Shift,
VirtualKey.Menu or VirtualKey.LeftMenu or VirtualKey.RightMenu => VirtualKeyModifiers.Menu,
VirtualKey.LeftWindows or VirtualKey.RightWindows => VirtualKeyModifiers.Windows,
_ => VirtualKeyModifiers.None,
};

return modifier != VirtualKeyModifiers.None;
}

private static HOT_KEY_MODIFIERS ToWin32Modifiers(VirtualKeyModifiers modifiers)
{
HOT_KEY_MODIFIERS result = 0;
if ((modifiers & VirtualKeyModifiers.Control) != 0) result |= HOT_KEY_MODIFIERS.MOD_CONTROL;
if ((modifiers & VirtualKeyModifiers.Menu) != 0) result |= HOT_KEY_MODIFIERS.MOD_ALT;
if ((modifiers & VirtualKeyModifiers.Shift) != 0) result |= HOT_KEY_MODIFIERS.MOD_SHIFT;
if ((modifiers & VirtualKeyModifiers.Windows) != 0) result |= HOT_KEY_MODIFIERS.MOD_WIN;
return result;
}

}
4 changes: 2 additions & 2 deletions AuraClick/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:windowex="using:WinUIEx"
Width="400"
Height="340"
Height="360"
MinWidth="400"
MinHeight="340"
MinHeight="360"
mc:Ignorable="d">

<Grid>
Expand Down
4 changes: 2 additions & 2 deletions AuraClick/NativeMethods.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
RegisterHotKey
UnregisterHotKey
CallWindowProc
SendInput
SetProcessInformation
GetCurrentProcess
SetPriorityClass
PROCESS_POWER_THROTTLING_CURRENT_VERSION
PROCESS_POWER_THROTTLING_EXECUTION_SPEED
PROCESS_POWER_THROTTLING_STATE
PROCESS_POWER_THROTTLING_STATE
WM_HOTKEY
15 changes: 10 additions & 5 deletions AuraClick/Pages/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
xmlns:controls="using:AuraClick.Controls"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dev="using:DevWinUI"
xmlns:helpers="using:AuraClick.Helpers"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI"
Expand Down Expand Up @@ -43,7 +43,7 @@

<!-- Click Interval -->
<StackPanel Grid.ColumnSpan="2" Spacing="{StaticResource StackPanelSpacing}">
<controls:IsEnabledTextBlock
<dev:IsEnabledTextBlock
x:Name="ClickIntervalTextBlock"
x:Uid="TextBlockClickInterval"
IsEnabled="{x:Bind ToggleButtonStart.IsChecked, Converter={StaticResource BoolNegationConverter}}" />
Expand Down Expand Up @@ -110,11 +110,15 @@
Grid.Row="2"
Grid.Column="0"
Spacing="{StaticResource StackPanelSpacing}">
<controls:IsEnabledTextBlock
<dev:IsEnabledTextBlock
x:Name="HotkeyTextBlock"
x:Uid="TextBlockHotkey"
IsEnabled="{x:Bind ToggleButtonStart.IsChecked, Converter={StaticResource BoolNegationConverter}}" />
<Button Content="F6" IsEnabled="False" />
<dev:Shortcut
x:Name="ToggleShortcut"
IsEnabled="{x:Bind ToggleButtonStart.IsChecked, Converter={StaticResource BoolNegationConverter}}"
PrimaryButtonClick="ToggleShortcut_PrimaryButtonClick"
SecondaryButtonClick="ToggleShortcut_SecondaryButtonClick" />
</StackPanel>

<!-- Click Repeat -->
Expand Down Expand Up @@ -178,7 +182,8 @@
x:Uid="ButtonSettings"
Grid.Column="1"
Height="32"
Click="SettingsButton_Click">
Click="SettingsButton_Click"
IsEnabled="{x:Bind ToggleButtonStart.IsChecked, Converter={StaticResource BoolNegationConverter}}">
<AnimatedIcon FallbackIconSource="{ui:FontIconSource Glyph=&#xE713;}">
<AnimatedIcon.Source>
<animatedvisuals:AnimatedSettingsVisualSource />
Expand Down
Loading
Loading