0

I'm looking for a way to intercept key presses from a certain keyboard (so not general keyboard input) and prevent Windows and other apps from receiving any key presses from this keyboard, essentially creating a macro keyboard.

I'm trying to create an app which would mask the keyboard as a MIDI device to help me with controlling my DAW.

I have an Arduino if this is impossible to do with software only.

porras
  • 61
  • 1
  • 7

1 Answers1

0

It is possible to grab specific keys by calling RegisterHotKey() or by installing a global keyboard hook or low-level keyboard hook. However, these functions do not allow to differentiate the source device of the key.

To prevent Windows from treating that keyboard as a general keyboard, you would have to write and install your own kernel driver.

If your Arduino can act as a USB device, you can make it a USB MIDI device that simply sends the desired MIDI messages.

CL.
  • 173,858
  • 17
  • 217
  • 259