如何拦截和翻译USB事件 [英] How to intercept and translate USB events

查看:341
本文介绍了如何拦截和翻译USB事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Philips LFH-2330查看图像(使用Windows Image Viewer或其他查看器,如IrfanView等)



LFH-2330是一个脚踏控制器,带有四个踏板(参见此处),用于控制音频播放软件转录。它有自己的驱动程序和软件。



我最简单的设置是一个软件,会从控制器捕获脚踏板事件,触发键盘事件



然而,这个简单的设置需要查看应用程序才能正常工作。 p>

更好的解决方案是能够从脚踏控制器控制查看应用程序,而不会将应用程序(也不会进入)焦点,以便我可以用我的手和分页与我的脚在同一时间。



这是解决这个问题的最好方法是什么?

解决方案


  • 它或多或少是黑客?以下可能在Windows上正常工作〜/ /



无论如何可以完成以下操作





  • 控制器了解USB命令(通过使用usb-tracer)

  • 编写一个过滤器驱动程序以拦截
    USB IRP并生成此类IRP

  • 从您的过滤器驱动程序生成IRP,
    从输入获取命令,
    说,键盘



为了做上述事情,你应该非常了解WDM模型。 IOCTL等~~~


I would like to use the Philips LFH-2330 to view images (with Windows Image Viewer or another viewer such as IrfanView, etc.)

The LFH-2330 is a foot controller with four pedals (see here for example) used to control audio playback software for transcription. It comes with its own driver and software.

The simplest setup for me would be a piece of software that would catch pedal events from the controller and trigger keyboard events instead (right pedal => right arrow, left pedal => left arrow).

This simple setup however needs the viewing application to be in focus in order for it to work.

A better solution would be to be able to control the viewing application from the foot controller without the application being (nor coming) into focus, so that I can type with my hands and paginate with my feet at the same time. (But this can also be achieved with two computers).

What would be the best way to approach this problem?

解决方案

  • It's more or less hacking right? The following might work on Windows ~~~

Anyway the following can be done

  • Understand the USB commands from the controller (by using usb-tracer)
  • Write a filter driver to intercept the USB IRP, and generate such IRP
  • Generate IRP from your filter driver, on getting commands from your input, say, Keyboard

For doing the above things, you should know about WDM model very well. IOCTL etc ~~~

这篇关于如何拦截和翻译USB事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆