Having grabbed the latest drivers, I did some poking around and discovered a handy .reg file containing the default registry settings. While the UI only allows you to change the actions of a few of the "multimedia keys" the .reg file suggested I might be able to do better than that. A quick bit of registry hacking later, and the "Play" button that was previously locked to the useless player supplied with the drivers now opens notepad.
Now to do something useful: tie the Msg button to open Pine instead of Lookout Express, the X'fer (?) button to open Directory Opus and the Menu button to open (for want of something better) SSH. The calculator and WWW buttons I left unchanged.
Next job: To get the nifty "You've Got Mail!" LED working. The software that comes with the keyboard only speaks POP3, and I use IMAP, so there's always something in the INBOX. That's OK, I have a nice Linux box sitting as a server/firewall between my network and the ADSL line to the Internet, so all I need is a little POP3->IMAP proxy to handle this simple request. 29 lines of Perl later, and I've got a nice little daemon that takes connections from the keyboard app, uses the username and password supplied to log onto the imap server, get the count of unread messages and return that to the client. (It helps that I've peen playing around with the 2 protocols a fair bit recently). I now get a blinking LED if (and only if) I do indeed have new mail.
Last thing: To replace the naff "Media Player" with control of Winamp - this is where I needed the registry hacking to override the default actions. The main difficulty here was that the command line utils I found wouldn't work with Winamp 3β - a quick downgrade to version 2.81 (still plays Ogg Vorbis, thankfully) later, and that was working too. Juggling the play/pause/stop functionality onto two buttons proved a bit of a problem, soon overcome (why do I need stop?).
So, there you have it. Useless junk to useful features in just a couple of hours' work. Now I just have to remember to use the buttons instead of, say, a Win-P-N-P-Enter key combo...
j00 0\X//\/
October 4 2002, 17:09:34 UTC 18 years ago
Not just because of the choice of music but because of the hack, which seems to me to be a true hacker's hack. I particularly like the "You've Got Mail!" LED hack. Be careful - everyone at work will want one...
I may be demonstrating more misunderstanding of mail transfer protocol than usual but how frequently is your IMAP server polled for new mail?
Next challenge: can you get your "scroll lock" light to flash three times whenever there's a new entry on your Friends page? ;-)
Re: j00 0\X//\/
October 4 2002, 17:29:46 UTC 18 years ago
Erm... OK, I'll try to explain (from first principles - ish). POP is designed to hold mail on the server until you download it onto your local machine, IMAP is designed to store email on the server and be read from there (possibly cached by local clients). This means that my INBOX always has loads of messages in it. The keyboard app talks POP, so it always sees messages in m INBOX, which it assumes are new and unread. Hence the problem, hence the proxy. The polling is done by the keyboard app, which I have talking to the proxy. When the proxy receives the POP STAT command (to return the number of messages), it connects to the IMAP server and does a STATUS INBOX (UNSEEN) which gives the count of unread messages rather than the total number of messages, and then returns this to the keyboard app. Phew. In answer to your question, the IMAP server is polled for new mail whenever the keyboard app polls the proxy (once a minute at the moment).
Well... The Windows LJ client flashes its system tray icon when there are new Friends entries, if there's some way to flash the keyboard LEDs thru' the windows APIs (I know you can in Linux - there's even a feature to flash kernel panic in morse code) then it would be possible to add this feature (source code is available).
Re: j00 0\X//\/
October 4 2002, 18:06:20 UTC 18 years ago
Damn, you're good!
Re: j00 0\X//\/
October 4 2002, 18:13:32 UTC 18 years ago
On the downside, my Windows programming skills amount to a bit of Delphi a few years back, so don't expect to see any actual code ;-)