Feelin' Productive

chromatic on 2003-06-08T07:03:42

Today was really productive. Here's what I did:

  • Moved one load of laundry to the dryer and folded it
  • Changed my bedding and towels
  • Washed and dried another load of laundry
  • Wrote a bit of JavaScript to navigate between HTML slides using the space bar, the backspace key, and the backtick key
  • Went to the MOSS meeting, though it meant dodging Rose Festival traffic. (Several people were impressed by my SimpleList and TempMail projects — more on those later.)
  • Cooked a spaghetti dinner for four other people besides myself
  • Wrote the CGI protocol translator for Jellybean, meaning that Jellybean::Wiki is now ported and working
  • Fixed a path-handling bug in Jellybean
  • Fixed a bug in CGI::Simple, sending a patch plus updated tests to the author
  • Wrote a program to convet last year's Test::Tutorial slides from AxPoint to Text::WikiFormat format
  • Updated my resume online to be explicit that I'm gainfully and very happily employed while linking to Onyx Neon Consulting, where I occasionally consult

I didn't write any of my talk for next Wednesday, nor did I proofread any of my book, which is also due on Wednesday. I'm still counting the day as a fantastic success, because it'd have been really tough to cram any more in there.


share?

lachoy on 2003-06-12T01:56:28

Can you share the javascript? It would prove extremely helpful in a few days...

Re:share?

chromatic on 2003-06-12T06:53:18

The real magic is just adding an identifier to your forward and back links, after you know how to respond to keypress events.

    <script>document.captureEvents(Event.KEYPRESS)

    function alert_keycode(e)
    {
        if (e.which == 8)
        {
            location.href = document.getElementById( 'prev' ).href;
        }
        else if (e.which == 32)
        {
            location.href = document.getElementById( 'next' ).href;
        }
        else if (e.which == 96)
        {
            location.href = document.getElementById( 'toc' ).href;
        }
    }
    document.onkeypress=alert_keycode</script>

I figured out the key values with alert( e.which ); in the function.

Re:share?

lachoy on 2003-06-12T14:13:49

Excellent. I'd figured you identified the link by the ID to know where to jump on command, but it's been so long since I did anything with JS that I didn't know about the 'getElementById()' shortcut. Thanks!