I'm trying to simulate the media keys with limited success so far.
I'm reusing the code from here: Send keys through SendInput in user32.dll
and have successfully simulated "VOLUME_DOWN" and "VOLUME_UP" but the MEDIA_NEXT_TRACK and MEDIA_PREV_TRACK aren't working.
my additional code
KeyCode[] actions = new KeyCode[4] { KeyCode.MEDIA_NEXT_TRACK, KeyCode.VOLUME_DOWN, KeyCode.MEDIA_PREV_TRACK, KeyCode.VOLUME_UP};
actionIndex = 0; // actual logic here irrelevant....
SendKeyPress(actions[actionIndex]);
I've made sure that the app I'm using (Metro Music) reacts to the key MediaNextTrack using autohotkey.
What am I missing?
Nir.