I just noticed that AddKeyboardShortcut() on windows actually accept most (if not all) VK_ key codes.
So if you ever wanted to handle those nifty Play, Pause, Next Track, Previous Track, Mute, Volume up, Volume Down keys and so on.
This is how to do that:
Code: Select all
#PB_Shortcut_NextTrack=$B0
#PB_Shortcut_PrevTrack=$B1
#PB_Shortcut_Stop=$B2
#PB_Shortcut_PlayPause=$B3
Code: Select all
AddKeyboardShortcut(#Window,#PB_Shortcut_NextTrack,#NextTrack)
AddKeyboardShortcut(#Window,#PB_Shortcut_PrevTrack,#PrevTrack)
AddKeyboardShortcut(#Window,#PB_Shortcut_Stop,#Stop)
AddKeyboardShortcut(#Window,#PB_Shortcut_PlayPause,#PlayPause)
http://msdn.microsoft.com/library/defau ... ycodes.asp
and also in the latest PSDK if you have that!
It's that easy, so now you have no excuse any more to not support "special" keys!
