Skip to content

Commit

Permalink
fix hotkey:can not send shift+f10
Browse files Browse the repository at this point in the history
  • Loading branch information
TransposonY committed Mar 15, 2015
1 parent 66095d5 commit 3077445
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion GestureSign.CorePlugins/HotKey/HotKey.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void Grid_PreviewKeyDown(object sender, KeyEventArgs e)
chkShift.IsChecked = true;
if ((e.KeyboardDevice.Modifiers & ModifierKeys.Windows) == ModifierKeys.Windows)
chkWin.IsChecked = true;
var keyCode = (e.Key == Key.System && e.SystemKey == Key.F10) ? (System.Windows.Forms.Keys)KeyInterop.VirtualKeyFromKey(Key.F10) :
var keyCode = (e.Key == Key.System) ? (System.Windows.Forms.Keys)KeyInterop.VirtualKeyFromKey(e.SystemKey) :
(System.Windows.Forms.Keys)KeyInterop.VirtualKeyFromKey(e.Key);
if (_KeyCode.Contains(keyCode)) return;
else
Expand Down
1 change: 1 addition & 0 deletions ManagedWinapi/KeyboardKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public KeyboardKey(Keys key)
public void PressAndRelease()
{
Press();
System.Threading.Thread.Sleep(30);
Release();
}

Expand Down

0 comments on commit 3077445

Please sign in to comment.