作者:李金铃519 | 来源:互联网 | 2023-01-01 08:56
ImwritingtwoC#appsinWPFusingMVVMpattern.Theseappswillbedisplayedonseparatescreens.
I'm writing two C# apps in WPF using MVVM pattern. These apps will be displayed on separate screens. First one is simple app with forms, etc. And another one is phone emulator.
我正在使用MVVM模式在WPF中编写两个c#应用程序。这些应用程序将分别显示在不同的屏幕上。一种是简单的带有表单的app,另一种是手机模拟器。
I've bought another keyboard and I want to bind second keyboard device only to phone emulator app, so it doesn't have to work with another applications (web browser, etc.). I'll be good if second app will handle second keyboard events even when focus is on first app.
我买了另一个键盘,我想把第二个键盘设备绑定到手机模拟器应用上,这样它就不需要和其他应用程序(web浏览器等)一起工作了。如果第二个应用能处理第二个键盘事件,即使焦点在第一个应用上,我也会很好。
I've tried to use LowLevelKeyboardProc but I can't find device name/id in given KBDLLHOOKSTRUCT structure.
我尝试过使用低级别keyboardproc,但是在给定的KBDLLHOOKSTRUCT结构中找不到设备名/id。
Do you know some alternative way to do this or how to get device name/id with LowLevelKeyboardProc?
你知道有什么替代方法吗?或者你知道如何用LowLevelKeyboardProc获取设备名/id吗?
1 个解决方案