-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 73d5317
Showing
83 changed files
with
16,604 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
*.sln merge=union | ||
*.csproj merge=union |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
################# | ||
## Visual Studio | ||
################# | ||
|
||
## Ignore Visual Studio temporary files, build results, and | ||
## files generated by popular Visual Studio add-ons. | ||
|
||
# User-specific files | ||
*.suo | ||
*.user | ||
*.sln.docstates | ||
|
||
# Build results | ||
|
||
[Dd]ebug/ | ||
[Rr]elease/ | ||
x64/ | ||
build/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
||
# MSTest test Results | ||
[Tt]est[Rr]esult*/ | ||
[Bb]uild[Ll]og.* | ||
|
||
*_i.c | ||
*_p.c | ||
*.ilk | ||
*.meta | ||
*.obj | ||
*.pch | ||
*.pdb | ||
*.pgc | ||
*.pgd | ||
*.rsp | ||
*.sbr | ||
*.tlb | ||
*.tli | ||
*.tlh | ||
*.tmp | ||
*.tmp_proj | ||
*.log | ||
*.vspscc | ||
*.vssscc | ||
.builds | ||
*.pidb | ||
*.log | ||
*.scc | ||
|
||
# Visual Studio profiler | ||
*.psess | ||
*.vsp | ||
*.vspx | ||
|
||
# Guidance Automation Toolkit | ||
*.gpState | ||
|
||
# ReSharper is a .NET coding add-in | ||
_ReSharper*/ | ||
*.[Rr]e[Ss]harper | ||
|
||
# TeamCity is a build add-in | ||
_TeamCity* | ||
|
||
# DotCover is a Code Coverage Tool | ||
*.dotCover | ||
|
||
# NCrunch | ||
.*crunch*.local.xml | ||
_NCrunch* | ||
|
||
# Installshield output folder | ||
[Ee]xpress/ | ||
|
||
# DocProject is a documentation generator add-in | ||
DocProject/buildhelp/ | ||
DocProject/Help/*.HxT | ||
DocProject/Help/*.HxC | ||
DocProject/Help/*.hhc | ||
DocProject/Help/*.hhk | ||
DocProject/Help/*.hhp | ||
DocProject/Help/Html2 | ||
DocProject/Help/html | ||
|
||
# Click-Once directory | ||
publish/ | ||
|
||
# Publish Web Output | ||
*.Publish.xml | ||
*.pubxml | ||
|
||
# NuGet Packages Directory | ||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line | ||
#packages/ | ||
|
||
# Backup & report files from converting an old project file to a newer | ||
# Visual Studio version. Backup files are not needed, because we have git ;-) | ||
_UpgradeReport_Files/ | ||
Backup*/ | ||
UpgradeLog*.XML | ||
UpgradeLog*.htm | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
|
||
# Folder config file | ||
[Dd]esktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ |
98 changes: 98 additions & 0 deletions
98
BondTech.HotKeyManagement.WPF.4/BondTech.HotKeyManagement.WPF.4.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>8.0.30703</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{C78F31C0-EC07-4194-90D4-9CB771AD41A1}</ProjectGuid> | ||
<OutputType>library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>BondTech.HotKeyManagement.WPF._4</RootNamespace> | ||
<AssemblyName>HotKeyManagement.WPF.4</AssemblyName> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<WarningLevel>4</WarningLevel> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Microsoft.VisualBasic" /> | ||
<Reference Include="PresentationCore" /> | ||
<Reference Include="PresentationFramework" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xaml" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="WindowsBase" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Page Include="Themes\Generic.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</Page> | ||
<Compile Include="Classes\Enums and Structs.cs" /> | ||
<Compile Include="Classes\Event Args.cs" /> | ||
<Compile Include="Classes\Event Handlers.cs" /> | ||
<Compile Include="Classes\Exceptions.cs" /> | ||
<Compile Include="Classes\Global Shortcut Manager.cs" /> | ||
<Compile Include="Classes\Helpers.cs" /> | ||
<Compile Include="HotKeyControl.cs"> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Classes\HotKeys.cs" /> | ||
<Compile Include="Classes\Keys Enum.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs"> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
<Compile Include="Properties\Resources.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DesignTime>True</DesignTime> | ||
<DependentUpon>Resources.resx</DependentUpon> | ||
</Compile> | ||
<Compile Include="Properties\Settings.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>Settings.settings</DependentUpon> | ||
<DesignTimeSharedInput>True</DesignTimeSharedInput> | ||
</Compile> | ||
<EmbeddedResource Include="Properties\Resources.resx"> | ||
<Generator>ResXFileCodeGenerator</Generator> | ||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||
</EmbeddedResource> | ||
<None Include="Properties\Settings.settings"> | ||
<Generator>SettingsSingleFileGenerator</Generator> | ||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> | ||
</None> | ||
<AppDesigner Include="Properties\" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Resource Include="HotKeyControl.Icon.png" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
80 changes: 80 additions & 0 deletions
80
BondTech.HotKeyManagement.WPF.4/Classes/Enums and Structs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace BondTech.HotKeyManagement.WPF._4 | ||
{ | ||
/// <summary>Specifies when the event for a LocalHotKey is raised. | ||
/// </summary> | ||
public enum RaiseLocalEvent | ||
{ | ||
/// <summary>Specifies that the event for a LocalHotKey should be raised when the key is down | ||
/// </summary> | ||
OnKeyDown = 0x100, //Also 256. Same as WM_KEYDOWN. | ||
/// <summary>Specifies that the event for a LocalHotKey should be raised when the key is released. | ||
/// </summary> | ||
OnKeyUp = 0x101 //Also 257, Same as WM_KEYUP. | ||
} | ||
|
||
internal enum KeyboardMessages : int | ||
{ | ||
/// <summary>A key is down. | ||
/// </summary> | ||
WmKeydown = 0x0100, | ||
/// <summary>A key is released. | ||
/// </summary> | ||
WmKeyup = 0x0101, | ||
/// <summary> Same as KeyDown but captures keys pressed after Alt. | ||
/// </summary> | ||
WmSyskeydown = 0x0104, | ||
/// <summary>Same as KeyUp but captures keys pressed after Alt. | ||
/// </summary> | ||
WmSyskeyup = 0x0105, | ||
/// <summary> When a hotkey is pressed. | ||
/// </summary> | ||
WmHotKey = 786 | ||
} | ||
|
||
internal enum KeyboardHookEnum : int | ||
{ | ||
KeyboardHook = 0xD, | ||
Keyboard_ExtendedKey = 0x1, | ||
Keyboard_KeyUp = 0x2 | ||
} | ||
|
||
/// <summary> | ||
/// The KBDLLHOOKSTRUCT structure contains information about a low-level keyboard input event. | ||
/// </summary> | ||
/// <remarks> | ||
/// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks/hookreference/hookstructures/cwpstruct.asp | ||
/// </remarks> | ||
[StructLayout(LayoutKind.Sequential)] | ||
public struct KeyboardHookStruct | ||
{ | ||
/// <summary> | ||
/// Specifies a virtual-key code. The code must be a value in the range 1 to 254. | ||
/// </summary> | ||
public int VirtualKeyCode; | ||
/// <summary> | ||
/// Specifies a hardware scan code for the key. | ||
/// </summary> | ||
public int ScanCode; | ||
/// <summary> | ||
/// Specifies the extended-key flag, event-injected flag, context code, and transition-state flag. | ||
/// </summary> | ||
public int Flags; | ||
/// <summary> | ||
/// Specifies the Time stamp for this message. | ||
/// </summary> | ||
public int Time; | ||
/// <summary> | ||
/// Specifies extra information associated with the message. | ||
/// </summary> | ||
public int ExtraInfo; | ||
} | ||
|
||
public enum KeyboardEventNames | ||
{ | ||
KeyDown, | ||
KeyUp | ||
} | ||
} |
Oops, something went wrong.