I'm working on a project that requires me to use some USB devices that are currently configured as keyboard devices (e.g. a scanner that reads the data off a card and just sends it through to cursor location as if that same data was typed on the keyboard). Instead of doing this, I want that data available as a char * buffer in code (or something similar). There are several different devices that no doubt have many configurations, but I feel like this standard approach could work for several different devices with very minor tweaks and avoid having to do a bunch of libusb programming (which was my first instinct).
Is there any such way of doing this in C/C++? Would the program need to run with any special permissions? Does it just involve redirecting some process stdout or something, or is it more complicated like intercepting signals/interrupts or something? Curious about how to go about this.