Skip to content

Commit 9de673c

Browse files
committed
Improve/simplificate action center fix
1 parent 6becdc6 commit 9de673c

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

FixSurfaceKeyboard/FixSurfaceKeyboard.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ int main(int argc, char* argv[])
3737
}
3838
}
3939

40-
RegisterApplicationRestart(NULL, 0);
41-
4240
HWND hwnd = CreateWindow(L"STATIC", NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL);
4341

4442
RAWINPUTDEVICE* rid = new RAWINPUTDEVICE[1];

FixSurfaceKeyboard/KeyboardUtils.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,10 @@ bool handleKey_SurfaceKeyboard(DWORD vk, int modifierState, bool keydown) {
121121
// pressing the action center key results in Shift + Ctrl + Alt + Win + F21,
122122
// which (obviously) doesn't open the action center.
123123
static bool blockActionCenter = false;
124-
if (keydown
125-
&& vk == VK_F21 && modifierState == (PK_RSHIFT | PK_LCTRL | PK_RALT | PK_LWIN)
126-
&& !blockActionCenter)
124+
if (keydown && vk == VK_F21 && modifierState == (PK_RSHIFT | PK_LCTRL | PK_RALT | PK_LWIN))
127125
{
128126
ShellExecute(0, 0, L"ms-actioncenter:", 0, 0, SW_HIDE);
129-
blockActionCenter = true;
130-
return true;
131127
}
132-
if (!keydown && vk == VK_LWIN)
133-
blockActionCenter = false;
134128

135129
return handleKey;
136130
}

Setup/Product.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"><?define FixSurfaceKeyboard_TargetDir=$(var.FixSurfaceKeyboard.TargetDir)?>
3-
<Product Id="*" Name="FixSurfaceKeyboard" Language="1033" Version="1.0.5.0" Manufacturer="Stephan Troyer" UpgradeCode="A4331800-4547-429D-B43B-EC66D61535F5">
3+
<Product Id="*" Name="FixSurfaceKeyboard" Language="1033" Version="1.0.6.0" Manufacturer="Stephan Troyer" UpgradeCode="A4331800-4547-429D-B43B-EC66D61535F5">
44
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" Manufacturer="Stephan Troyer" InstallPrivileges="elevated" />
55

66
<Property Id='ARPURLINFOABOUT'>https://github.com/stephtr/FixSurfaceKeyboard</Property>

0 commit comments

Comments
 (0)