My Dell keyboard has media keys for play, pause, stop, mute etc. They work in iTunes, but only if iTunes has window focus.
How do I make them work regardless of the window currently in focus?
you do not have to install anything. simply just go "Edit>Preferences>Then click the check box that says "Enable full keyboard navigation""
you are done. you can control iTunes now with your keyboard even if it is not the active window
You could try downloading iTunesKeys and seeing if it lets you set them to control the functions. It may or may not depending on how they work.
I personally use iTunes Media Keys, it works great. I tired iTunes Keys and it didn't work. I'm using a Dell SK-8135 keyboard.