How to intercept and translate USB events

老子叫甜甜 提交于 2020-01-04 13:09:21

问题


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?


回答1:


  • 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 ~~~



来源:https://stackoverflow.com/questions/1844509/how-to-intercept-and-translate-usb-events

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!