#PB_Shortcut_PlayPause and other media/special keys!
Posted: Fri May 20, 2005 7:30 pm
Code updated For 5.20+
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:
It's that simple, just define the missing constants and you can do things like this:
The full list can be found at:
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!
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!
