Monday, April 13, 2009

org-mode revisited

With the school-leaving exams in June drawing closer, I have little time to write posts. However, having little time means having to manage it better. In this spirit I invested some time in reading about task management and planning - with org-mode, incidentally.
Organizing stuff logically if fun for some - I'm one of them. Also, as GTD (see below) says, it does help to get things 'off your mind'.

As usual, instead of rephrasing information already on the 'net, here are the links you should check out (possibly just skim through for ideas) if I got your attention:

  • Getting Things Done (GTD for short) is all the buzz in time/task management. I adapted it somewhat to make it more comfortable for my twisted way of thinking, but it's a great framework.
  • A nice writeup on how Charles Cave "uses org-mode to implement GTD". This was the real time-saver for me. And guess what, the site is made with org-mode. How's that for self-documenting?

This whole thing might be strange at first, but give it a try. In the worst case, you've lost half an hour thinking about organizing yourself. In the best case, you've gained a framework and tool for... well, organizing yourself. And that's actually not a small gain at all.

Tuesday, April 7, 2009

Microsoft Ergonomic 4000 and Linux

I recently got a Microsoft Natural© Ergonomic 4000 keyboard. After a few days of usage I really like it. I still make quite a lot of typos, but that's not a surprise.

Software issues

However, I do have two issues with it. Problem number one is related to the extra keys and Linux. Most of the keys work fine, but the zoom slider in the middle sends keycodes higher than 255, which means they don't get to X.org. A utility called keyTouch solves this. It maps scancodes (the low-level cousins of keycodes) to keycodes and possibly also custom actions. That last part with the actions doesn't work for me, but WTH.
I use the slider for scrolling. (it's labeled "Zoom" on the keyboard... what the heck am I supposed to zoom in a browser or a text editor? ^_^) So first, to give the slider some keycodes X.org understands, save the following snippet in a file and import it with keyTouch as a new keyboard. You can change "SCROLLUP" and "SCROLLDOWN" to any of the values in the Keycode dropdown of keyTouch Editor.

<keyboard>
  <file-info>
    <syntax-version>1.1</syntax-version>
    <last-change format="%d-%m-%Y">07-04-2009</last-change>
    <author>Zoltán Nagy (abesto0.at.gmail.com)</author>
  </file-info>
  <keyboard-info>
    <keyboard-name>
      <manufacturer>Microsoft</manufacturer>
      <model>Natural Ergonomic 4000</model>
    </keyboard-name>
  </keyboard-info>
  <key-list>
    <key>
      <name>Zoom Up</name>
      <scancode>844205</scancode>
      <keycode>SCROLLUP</keycode>
      <default-action action-type="plugin">
        <plugin-name>Scroll</plugin-name>
        <plugin-function>Up</plugin-function>
      </default-action>
    </key>
    <key>
      <name>Zoom Down</name>
      <scancode>844206</scancode>
      <keycode>SCROLLDOWN</keycode>
      <default-action action-type="plugin">
        <plugin-name>Scroll</plugin-name>
        <plugin-function>Down</plugin-function>
      </default-action>
    </key>
  </key-list>
</keyboard>

If you use this keyboard file, and the keyTouch daemon is running, the slider will produce the XF86ScrollUp and XF86ScrollDown keycodes. To actually make it scroll, add the following to ~/.Xmodmap:

! For Microsoft Natural 4000
! iacute is missing from the English keyboard layout; I need it sometimes
keycode 196 = iacute
! Scrolling
keysym XF86ScrollUp = Prior
keysym XF86ScrollDown = Next

The rest of the extra keys seem to produce nice XF86* keycodes and can be used out of the box. Maybe except for the calculator key, but I really can't imagine a use-case for that.

Hardware issues

Actually, that's just one issue: the space bar. There was a discussion on the topic at priscimon.com. The general consensus seems to be to apply some lubricant and just keep using it - it smooths out over time. I tried the lubricant trick, and it was great for a day or so, but it's back to spacebar stiffieness for now. I do hope it just needs "breaking in".

Aside from the spacebar problem, this keyboard is a vast improvement over everything I've used before. Once I'm up to my old typing speed, it'll be pure joy to use.