Fix remapping issues to Home/PgUp and other keys which are also present on NumPad (#4398)

* Added extended key flag to more keys

* Add test for extended key flag

* Move shlwapi.lib reference

* Added shcore ref

* Fixed pipeline incompatibility

* Fixed lib declaration in common

* Fixed formatting

* Remove unused statements

* removed another statement
This commit is contained in:
Arjun Balgovind
2020-06-24 20:28:54 -07:00
committed by GitHub
parent 8e758507b1
commit f1b6e6570c
7 changed files with 49 additions and 9 deletions

View File

@@ -75,6 +75,17 @@ namespace KeyboardManagerHelper
case VK_NUMLOCK:
case VK_SNAPSHOT:
case VK_CANCEL:
// If the extended flag is not set for the following keys, their NumPad versions are sent. This causes weird behavior when NumLock is on (more information at https://github.com/microsoft/PowerToys/issues/3478)
case VK_INSERT:
case VK_HOME:
case VK_PRIOR:
case VK_DELETE:
case VK_END:
case VK_NEXT:
case VK_LEFT:
case VK_DOWN:
case VK_RIGHT:
case VK_UP:
return true;
default:
return false;

View File

@@ -100,6 +100,12 @@
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Lib>
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">shlwapi.lib;</AdditionalDependencies>
</Lib>
<Lib>
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">shlwapi.lib;</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Helpers.cpp" />