Typing, window managers and sore hands

June 19, 2007 at 02:24 PM | categories: Technical, Health | View Comments |

I am typically typing on a keyboard for many hours a day, and have been in this routine for many years. While I have never had soreness bad enough to prevent me from using a computer, unlike some unfortunate people, I definitely get some discomfort in my hands and wrists. This is pretty clearly a form of RSI brought on at least in part by my long hours using computers. It is also likely related to strains I sometimes get from boxing, which can be very hard on your wrists if you are not careful. Improperly throwing hooks on a heavy bag can leave you with a strained wrist for weeks. I will return to boxing-related injuries (which apply to many other sports too) in another post perhaps. At work, I have a fairly ergonomic setup. Monitor is on a stand at a good level, I have a USB Microsoft Natural keyboard. I believe the keyboard does help my hands to some degree, although I can't really say it makes a huge difference. My brother claims that he found it made typing more uncomfortable for him, so perhaps it varies from person to person. I find that chording - that is, pressing multiple keys with a single hand, for example left shift + f all with the left hand - would make my fingers feel uncomfortable. Not exactly pain, but a kind of strained feeling. I find the Emacs editor very uncomfortable to use if you have the habit of chording for example. Similarly, GNU Screen and OpenBSD's KSH Emacs bindings - which I use all the time - are definite source of discomfort. I try now quite hard to avoid chording as much as possible. This seems to reduce considerably the strain on my hands. Additionally, using the Vi cursor movement keys in Mutt and nVi / Vim helps - in contrast to moving my hand over to use the arrow keys. A second source of discomfort I identified was the mouse. I'm not entirely sure why, but it seems to me that shifting my right hand from its position on the keyboard over to the mouse, and also clicking the mouse, was quite stressful. I recall reading at JWZ's site that he experienced something similar. The two biggest culprits of mouse usage for me were Firefox (obviously enough) and window management. I have gone through using many different window managers over the years. I am not hugely picky. I used fvwm for a while because it did everything I needed it to do, and came with OpenBSD. Then I switched to Ion for no particular reason. I liked Ion quite a bit but the author kept breaking the configuration format with every update. This infuriated me as I hate dicking around with funky configuration files (all Ion config was done through the Lua programming language, which I had no particular desire to learn in order to set a few trivial keyboard bindings). Eventually I switched to KDE from Ion. I figured KDE was unlikely to change their config format with every release and furthermore had a few nice features (task bar and the system tray thingy). Also I thought it would be good to at least try to fill up the 1G of RAM in my laptop. I learned a few key bindings in KDE, enough to switch between apps on the same virtual desktop. However, I am a very heavy user of terminals. I quite liked the tabbed Konsole (even if it is horrendously slow at scrolling text for some reason), yet I never really learned / set up the keyboard bindings properly, which mean I was using the mouse all the damn time. This morning, since I had nothing really critical to do on my machine, I decided to update my system to the latest snapshot and move over to CWM at the same time. CWM is a little window manager written by people who have over the years been involved with OpenBSD development. Its BSD-licensed and as such was imported into the OpenBSD Xenocara tree. In other words, if you install X on an OpenBSD machine, you now get CWM as a window manager. The main thing about CWM is that it is quite possible to use it purely via the keyboard. I'm not going to describe all the various ways you can use it, since I've only been using it for a few hours. Some really nice features are things like, labeling windows, hiding them with a key combo, then raising them again using a kind of type-ahead-find. I also like how window movement is implemented - you hold the meta key and can move the window by clicking anywhere on it. Sometimes it takes quite a bit of co-ordination to specifically click on the task bar to move a window around. In any case, I am very happy with CWM so far. I don't need a lot of frills in my window manager. CWM is very nice to use from the keyboard. It doesn't require any configuration. One thing is that its not easily possible to change the command line options passed to Xterm when you execute it via C-M-Enter. To get around this and to set my Xterms to use white-on-black and be a login shell, I use the following in ~/.Xdefaults: xterm*background: black xterm*foreground: white xterm*loginShell: true I'm also now making considerable more use of Firefox's type-ahead-find feature, and other keyboard shortcuts in that application. Unfortunately Firefox seems to have a number of glitches, at least on OpenBSD-current. Most annoying is that the ctrl+k shortcut, which is supposed to give focus to the search box, doesn't work unless focus is on the browser component of the tab. This means that if you open a new tab with ctrl+t and then hit ctrl+k, nothing will happen. You have to first click the blank browser component. I'd also love a shortcut similar to tab, but which cycles through only the text input components on a page. This is required apparently because web authors are not setting a 'tabindex' property correctly, according to my brother. He suggests I could write a Greasemonkey script to rectify this if I was really bothered. Perhaps I should do that. Update: After reading a bit on Firefox keybindings, I came across some suggestions that claimed Opera has very good support for keyboard shortcuts. I installed it from the www/opera port and am now running it. So far it does indeed seem very nice. I like the kind of mini-task-list it has for switching between tabs (ctrl+tab). Also it has nice support for cycling through text input fields, and just like Firefox has type-ahead-find. Finally, I was pointed to a Firefox extension called Conkeror which offers Emacs keybindings for Firefox. It also claims to offer Vi keybindings. While I use both Emacs and Vi keybindings in different settings, and I use both as editors, I believe I would prefer Vi keybindings for my web browser. I will have to try this out and see how it goes. The author claims he does not own a mouse which is very encouraging.

Niall O'Higgins is an author and software developer. He wrote the O'Reilly book MongoDB and Python. He also develops Strider Open Source Continuous Deployment and offers full-stack consulting services at FrozenRidge.co.

blog comments powered by Disqus