Zorac (zorac) wrote,
Zorac
zorac

  • Mood:
  • Music:

Keyboard hacking

Once upon a time, many moons ago, I came into possession of an exciting Multimedia Keyboard on the grounds that it was cheap. I never used the multimedia stuff because it was, frankly, pants. This evening I decided to play around with it again...

[ Image of the multimedia keys ]

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...
Subscribe

  • Not quite the Neverending Story

    I mentioned a couple of weeks back that I was playing The Longest Journey - an entry of that oft-neglected genre of computer games, the…

  • Random media ramblings...

    SomethingAwful has a bunch of B-Movie-style poster spoofs which are well worth a look. Page 8 has the HP one, most of the rest are pretty good…

  • Movie misdirection...

    And the "totally misleading trailer of the week" award goes to Bridge to Terabithia. Given the current cinematic drought, I was happy to catch a…

  • Post a new comment

    Error

    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments
Oh dear. I was hoping that I would be proposing something impossible or almost impossible and you already have a sound-looking plan of attack... :-)

Damn, you're good!
And a quick google turned up evidence of existing email apps that do the scroll-lock-flahsing thing to alert to new mail, so it's definately possible.

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 ;-)