I am building an multimedia console based on an old computer running Win7.
I want to control the players with a numeric keyboard. I can't use the common media control devices because they respond only to windows media player. I will use the KVM Player, Winamp and others. So each one has it's own set of keyboard shortcuts for play, pause, foward, volume etc.
For that I am thinking of building a Delphi application that detects the foreground application and gets from a database the shortcuts this application uses.
When I use the numeric keyboard (the size of a regular remote control) and press 5
for play, my application could detect it and send to the OS the P
key if I am using Winamp or Space
if I am using Media Player Classic.
What functions should I use to first grab the pressed key and then send a different key?