Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion IconExtractor/IconExtractor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IconExtractor</RootNamespace>
<AssemblyName>IconExtractor</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
Expand All @@ -31,6 +31,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
3 changes: 2 additions & 1 deletion KeyboardHookLib/KeyboardHookLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -31,6 +31,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
2 changes: 1 addition & 1 deletion KeyboardRedirector/ActionPerformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
using MS;

namespace KeyboardRedirector
{
{
class ActionPerformer
{
class KeyInformation
Expand Down
216 changes: 108 additions & 108 deletions KeyboardRedirector/ActionPropertiesDialog.Designer.cs

Large diffs are not rendered by default.

29 changes: 20 additions & 9 deletions KeyboardRedirector/InputDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public sealed class InputDevice

private const int VK_OEM_CLEAR = 0xFE;
private const int VK_LAST_KEY = VK_OEM_CLEAR; // this is a made up value used as a sentinel


private const string Prefix = @"\\?\"; //Windows 10 Virtual Keyboard

#endregion const definitions

#region structs & enums
Expand Down Expand Up @@ -449,17 +451,26 @@ private string ReadReg( string item, ref bool isKeyboard )
// Example Device Identification string
// @"\??\ACPI#PNP0303#3&13c0b0c5&0#{884b96c3-56ef-11d1-bc8c-00a0c91405dd}";

// remove the \??\
item = item.Substring(4);
#region OLD
//// remove the \??\
//item = item.Substring(4);

//string[] split = item.Split('#');

string[] split = item.Split('#');
//string id_01 = split[0]; // ACPI (Class code)
//string id_02 = split[1]; // PNP0303 (SubClass code)
//string id_03 = split[2]; // 3&13c0b0c5&0 (Protocol code)
////The final part is the class GUID and is not needed here

string id_01 = split[0]; // ACPI (Class code)
string id_02 = split[1]; // PNP0303 (SubClass code)
string id_03 = split[2]; // 3&13c0b0c5&0 (Protocol code)
//The final part is the class GUID and is not needed here
//string keyname = string.Format(@"System\CurrentControlSet\Enum\{0}\{1}\{2}", id_01, id_02, id_03);
#endregion

string keyname = string.Format(@"System\CurrentControlSet\Enum\{0}\{1}\{2}", id_01, id_02, id_03);
#region Fix
if (item == null || !item.StartsWith(Prefix)) return item;
string[] array = item.Substring(Prefix.Length).Split('#');
if (array.Length < 3) return item;
string keyname = string.Format(@"System\CurrentControlSet\Enum\{0}\{1}\{2}", array[0], array[1], array[2]);
#endregion

key = Registry.LocalMachine.OpenSubKey(keyname, false);

Expand Down
33 changes: 29 additions & 4 deletions KeyboardRedirector/KeyboardRedirector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
Expand All @@ -32,13 +32,14 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -48,7 +49,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;RAWINPUT,!LOG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -140,6 +141,10 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="bin\KeyboardRedirector.exe.config" />
<None Include="COPYING" />
<None Include="Images\TreeViewIcons.pdn" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand All @@ -157,7 +162,27 @@
<Compile Include="XMLFileStore.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="bin\Hook32.exe" />
<Content Include="bin\Hook64.exe" />
<Content Include="bin\IconExtractor.dll" />
<Content Include="bin\IconExtractor.pdb" />
<Content Include="bin\KeyboardHook32.dll" />
<Content Include="bin\KeyboardHook64.dll" />
<Content Include="bin\KeyboardHookLib.dll" />
<Content Include="bin\KeyboardHookLib.pdb" />
<Content Include="bin\KeyboardRedirector.exe" />
<Content Include="bin\KeyboardRedirector.pdb" />
<Content Include="bin\Win32.dll" />
<Content Include="bin\Win32.pdb" />
<Content Include="Icon.ico" />
<Content Include="Images\Config.png" />
<Content Include="Images\DefaultApplication.png" />
<Content Include="Images\DefaultApplicationNotFound.png" />
<Content Include="Images\TreeViewIcon-Blue-Yellow.png" />
<Content Include="Images\TreeViewIcon-Blue.png" />
<Content Include="Images\TreeViewIcon-Green.png" />
<Content Include="Images\TreeViewIcon-Red.png" />
<Content Include="Images\TreeViewIcon-Yellow.png" />
<Content Include="TODO.txt" />
</ItemGroup>
<ItemGroup>
Expand All @@ -166,7 +191,7 @@
<Name>IconExtractor</Name>
</ProjectReference>
<ProjectReference Include="..\KeyboardHookLib\KeyboardHookLib.csproj">
<Project>{5802C646-7DC1-4D87-A5D9-82F31CDDCF36}</Project>
<Project>{5802c646-7dc1-4d87-a5d9-82f31cddcf36}</Project>
<Name>KeyboardHookLib</Name>
</ProjectReference>
<ProjectReference Include="..\Win32\Win32.csproj">
Expand Down
Loading