This page seems to be the top result for this problem when Googling "vlc media keys not working", however the top (and only) answer doesn't actually address the problem. The information is useful for someone setting up VLC media key functionality for the first time but a bit of browsing around suggests that this problem persists for some people even after setting their hot key preferences.
There is another solution if your media keys refuse to work without VLC being the focused application:
Uninstall 'Microsoft Mouse and Keyboard Center'. This can be found in your Windows Control Panel's normal uninstall page.
This is some sort of bonus program that Windows Update may install if you have a Microsoft branded mouse or keyboard (possibly on your behalf) that as far as I can tell offers little meaningful functionality over standard Windows mouse options, especially if your mouse / keyboard is a basic one. When it is installed it seems to meddle with media key input, preventing VLC from detecting button presses when it is not focused.
If you have a volume control keyboard feature you may be able to test whether you have this installed. Simply use your keyboard volume control while on the Windows desktop. A light blue bar may appear at the bottom right of your desktop showing the change in volume, near the notification area. I believe this means the program is installed. If you uninstall the program this pop-up does not appear.
This was discovered and tested on Windows 7. I do not know whether this is relevant to Windows 8 or above.
you know application hotkeys will work only when you select the application. Assume you are working on a doc and you have selected and some other application and if you press any hotkeys then actions should reflect on application and not that opened doc obviously :) – rɑːdʒɑ – 2014-07-09T05:20:35.333
@AgentCool While that's true with VLC, it's not true with many other media players. WinAmp used to be controllable from inside other apps using system-wide keyboard hooks. About the only time it didn't work was in a game using DirectInput which is why things like HLAmp came about – Basic – 2014-10-05T12:35:32.077
3@OP - You asked a question and got the answer. Did it help? If not, then ask further for clarification. If yes - then mark the answer accepted so the responder gets credit and so others know it's the right answer. It's how the community works! – JoelAZ – 2015-01-27T19:25:58.950