Skip to content

Commit 6c6c349

Browse files
committed
Fix issue preventing assignment of Function keys
1 parent 1ddc4d4 commit 6c6c349

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

ScreenSleep/MainWindow.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref b
7070
{
7171
if (msg == 0x0312 && wParam.ToInt32() == Settings.HotkeyId)
7272
{
73+
74+
7375
Task.Delay(1000 * Properties.Settings.Default.SleepTimer).ContinueWith(t => TurnOff_OnClick(null, null));
7476
}
7577

ScreenSleep/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.0.0.4")]
55-
[assembly: AssemblyFileVersion("1.0.0.4")]
54+
[assembly: AssemblyVersion("1.0.0.5")]
55+
[assembly: AssemblyFileVersion("1.0.0.5")]

ScreenSleep/Settings.xaml.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,14 @@ public static void SetupSleepShortcut(WindowInteropHelper helper)
6565
{
6666
var shortcut = Properties.Settings.Default.SleepShortcut.ToLower();
6767

68-
string keyString = shortcut.Substring(shortcut.Length - 1);
68+
string keyString = shortcut;
6969
var modifiers = 0;
7070

71+
if (shortcut.Contains("+"))
72+
{
73+
keyString = shortcut.Substring(shortcut.Length - 1);
74+
}
75+
7176
if (shortcut.Contains("alt"))
7277
{
7378
modifiers += 1;

0 commit comments

Comments
 (0)