porras
porras

Reputation: 61

Replace keyboard with custom functionality

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.

Upvotes: 0

Views: 61

Answers (1)

CL.
CL.

Reputation: 180210

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.

Upvotes: 0

Related Questions