After drowning my faithful old keyboard with my morning coffee, I had to replace it and, after taking some time to find a corded keyboard without a zillion useless keys, without shiny platic, with cursor keys in their standard location, and a reasonable touch feeling, I bought an OEM version of the Logitech Internet Keyboard 350 USB and am indeed quite satisfied with the keyboard look and touch.
Now, minimal though that keyboard is, it still has these small multimedia keys on top, and under XP they're handled by default. Most choices were just fine, but the media player defaulting to RealPlayer didn't fit my wishes: I'd rather run VLC in these cases to show FreeTV. But the keyboard isn't supplied with a driver, and installing Logitech's setpoint™ actually removes functionality to these keys when compared with the XP default driver. So exit SetPoint and back to the default driver.
Finding key codes
Now, how to redirect that key ? For once, google proved of little help: the keycodes werent documented, so a bit of Delphi enabled me to obtain the key codes, which are as follows:
- (key) : (hex virtual key code)
- Multimedia Player : B5
- Email : B4
- Home page : AC
- Calculator : B7
- Play/Pause : BB
- Lower volume : AE
- Higher volume : AF
- Mute : AD
However, this seemed to go nowhere : I would not run a keyboard hooking program just for that key. So what ? It seemed logical to have the keys be based on file types.
After a bit of tweaking, it appears that for some reason, this key is linked to the
CDA (CD track) type. Which gives a procedure to customize the key:
- open Explorer
- go to tools / options / file types
- scroll down to CDA
- modifiy the default selection using the, replacing the current default by VLC
Now, this is all very nice, but watching FreeTV requires VLC to be run with at least the URL of the playlist:
http://mafreebox.freebox.fr/freeboxtv/playlist.m3u. This can be achieved in the same place by using the advanced choice. It may be hidden by the previous modification and appear only if you click Restore first.
This can also be set in the registry, by modifying the
HKLM\SOFTWARE\Classes key which currently defines the CDA handler, but it is simpler to do it through the Files types box.
Problem is: the parameters are not passed to VLC, so the playlist isn't started and VLC stays quiet. Solution : run a BAT file instead. Just two lines will do ; just be sure to use the proper path to VLC.
start "TV Glotzer" /D"C:\Program Files\VideoLAN\VLC" vlc.exe --intf wx http://mafreebox.freebox.fr/freeboxtv/playlist.m3u"
Why this syntax ? Why not use a plain:
C:\Program Files\VideoLAN\VLC\vlc.exe --intf wx http://mafreebox.freebox.fr/freeboxtv/playlist.m3u
This is because the
START batch command allows us to run the program in the background and exit the batch file immediately, closing the DOS window in which the BAT file runs, instead of leaving it opened while watching TV.
All fine ? Well almost... this works just as described, for a moment.
Then after some time, RealPlayer starts running again when hitting the player key: apparently one of the processes in the RP suite considers the setting may have been erased unwillingly and restores RP as the default CDA handler. You'll need to remove the CD from the list of media handled by real from within the Real UI (Tools / Preferences / Content) for Real to admit you don't want it to handle this media type. After that your key customization holds for a bit longer.
However, over time, Real overwrites it anyway, reverting your changes to place their ad-laden UI instead of your own choice. Depressing to have so little control on one's own machine.
TV Glotzer ?
Google should help you on that one :-)
Boring legal stuff
SetPoint is a trademark of Logitech. Sometimes registered, sometimes not. Windows XP is a trademark of Microsoft Corporation. RealPlayer is a trademark of RealNetworks, Inc. Delphi is a registered trademark of Borland Corporation (yes, even in early 2007, Codegear lists it thus).