It looks like in the code you posted that you are filtering to only the key up and key down events: 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) hookedKeyboardCallbackAsync.BeginInvoke((InterceptKeys.KeyEvent) wParam.ToUInt32(), Marshal.ReadInt32(lParam), null, null);当您删除内部if语句时会发生什么?what happens when you remove your inner if statement? private IntPtr LowLevelKeyboardProc(int nCode, UIntPtr wParam, IntPtr lParam) { if (nCode >= 0) hookedKeyboardCallbackAsync.BeginInvoke((InterceptKeys.KeyEvent) wParam.ToUInt32(), Marshal.ReadInt32(lParam), null, null);根据本文播放等效于Ctrl + Shift + P和暂停"等效于Ctrl + P.您能详细说明一下您所看到的吗?也许提供一些代码会有所帮助.According to this article Play is equivalent to Ctrl+Shift+P and Pause is equivalent to Ctrl+P. Can you elaborate on what you are seeing? Perhaps providing some code would help. 这篇关于用于全局捕获Media Center远程特殊键的C#API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 12:05