diff --git a/PowerAccent.Core/Tools/KeyboardListener.cs b/PowerAccent.Core/Tools/KeyboardListener.cs index 16c018f..3ab74db 100644 --- a/PowerAccent.Core/Tools/KeyboardListener.cs +++ b/PowerAccent.Core/Tools/KeyboardListener.cs @@ -75,14 +75,11 @@ private IntPtr LowLevelKeyboardProc(int nCode, UIntPtr wParam, IntPtr lParam) { if (nCode >= 0) if (wParam.ToUInt32() == (int)InterceptKeys.KeyEvent.WM_KEYDOWN || - wParam.ToUInt32() == (int)InterceptKeys.KeyEvent.WM_KEYUP || - wParam.ToUInt32() == (int)InterceptKeys.KeyEvent.WM_SYSKEYDOWN || - wParam.ToUInt32() == (int)InterceptKeys.KeyEvent.WM_SYSKEYUP) + wParam.ToUInt32() == (int)InterceptKeys.KeyEvent.WM_KEYUP) { //Captures the character(s) pressed only on WM_KEYDOWN var chars = InterceptKeys.VKCodeToString((uint)Marshal.ReadInt32(lParam), - wParam.ToUInt32() == (int)InterceptKeys.KeyEvent.WM_KEYDOWN || - wParam.ToUInt32() == (int)InterceptKeys.KeyEvent.WM_SYSKEYDOWN); + wParam.ToUInt32() == (int)InterceptKeys.KeyEvent.WM_KEYDOWN); if (!hookedKeyboardCallbackAsync.Invoke((InterceptKeys.KeyEvent)wParam.ToUInt32(), Marshal.ReadInt32(lParam), chars)) { @@ -108,20 +105,12 @@ bool KeyboardListener_KeyboardCallbackAsync(InterceptKeys.KeyEvent keyEvent, int if (KeyDown != null) return KeyDown.Invoke(this, new RawKeyEventArgs(vkCode, false, character)); break; - case InterceptKeys.KeyEvent.WM_SYSKEYDOWN: - if (KeyDown != null) - return KeyDown.Invoke(this, new RawKeyEventArgs(vkCode, true, character)); - break; // KeyUp events case InterceptKeys.KeyEvent.WM_KEYUP: if (KeyUp != null) return KeyUp.Invoke(this, new RawKeyEventArgs(vkCode, false, character)); break; - case InterceptKeys.KeyEvent.WM_SYSKEYUP: - if (KeyUp != null) - return KeyUp.Invoke(this, new RawKeyEventArgs(vkCode, true, character)); - break; default: break;