Keyboards and layouts

When using eXtreme Programming (XP) as software methodology, you often get a lot of problems to put it in place (management does not agree, some developers are reluctant). But what you might not expect is having tiny annoying problems with keyboards.

One of the techniques pushed by XP is pair programming. This implies having two developers working together in front of the same computer.

At any moment only one developer is writing code (this is the driver) and the other one is reviewing the code, giving advices, making sure that the code written by the driver is following the design rules of the project, etc. (this is the navigator).

But the roles between the two developers switch frequently, or the navigator needs to write a little piece of code to show to the driver, so the keyboard is moving a lot between both of them.

Sometimes we end up having two keyboards plugged in the computer, one for each of them, like this:

Pair programming setup

Teams are frequently composed with people coming from different countries and having different habits and so many different keyboards layouts. I worked with an Irish guy using an American qwerty keyboard with an English layout (or vice versa), in France we usually use French azerty keyboards with French layout but I'm using an Apple international English qwerty keyboard with international English qwerty layout.

So each time you start pair programming you have to look at what kind of keyboard you are going to use (if it's not yours) and what layout is used (and maybe change the layout each time one of the developers start writing).

What I find annoying here is that even with two keyboards, you have to switch the layout because the operating system uses only one layout at a time. I have seen the same behavior on Microsoft Windows, GNU/Linux and even Mac OS X.

I'm wondering why layouts are not bound with keyboards. Maybe not a strict binding like keyboard A use only layout A and keyboard B use only layout B, but a list of layouts and the keyboards are bound with the last layout they where used with.

Maybe pair programmers are not very common, but I think that we are not the only ones with that problem. More and more laptops are sold, and quite often people use a desktop keyboard while using the laptop at home. They have to change the layout only once, but I'm sure we should avoid that (and on some operating system the task is really not easy the first time).

There are also programmable keyboards. On such keyboards you can change the code sent by each key when typing and create your own layouts. Maybe those kind of keyboards will solve the problem but they are expensive and hard to find.

Art Lebedev created the Optimus Maximus programmable keyboard where each key is an OLED display. Here they solved an other problem: having one unique "universal" keyboard. It can be used with azerty layout, qwerty layout or anything you can imagine and each key display the characters which is going to be written.

Optimus Maximus

Among others, a thing I find very interesting in the Optimus Maximus is the software to configure the keyboard:

Optimus Configurator

It provides a nice interface to configure layouts. I would like that kind of interface to configure my keyboards, since they are seldom recognized correctly, some keys are always wrong, or the behavior is not exactly what I want and finding the right layout in a big list is painful.

Here is the scenario I would like to have:

  • I have a computer with an azerty keyboard plugged in and configured.
  • I plug a new keyboard on my computer.
  • A configuration window should open asking to type some keys in order to detect which kind of layout is configured (like Mac OS X or some Linux distribution do).
  • If it's recognized as a qwerty keyboard, each time I type something on the keyboard the layout switch to qwerty.
  • If I type on the azerty keyboard, the azerty layout is used.
  • When using the qwerty keyboard I should be able to switch to an other layout, azerty for example. The last layout used for a given keyboard is bound to it until I change it.
  • A nice interface like Optimus Configurator should allow me to fine tune my layouts.

As far as I have seen until now, mainstream operating systems assume that a lot of things are unique. This situation started to change few years ago, now we can plug several keyboards, mice, screens on the same computer, but the software doing the configuration has not evolved a lot. The most common thing is having several screens. If you already tried to configure multiple screens, you may have found that it's quite easy on Mac OS X, it's hard on Windows and it's really painful on Linux. The worst thing I have seen is some software considering that multiple screens equals 2 screens, with 3 screens it's just not working and clearly not designed for. But most of the time, you can have only one keyboard/mouse configuration (you can't have several mice with different speed configurations).

Edit (2012-08-27): looks like I was wrong, a keymap can be specified for each keyboard on Linux.

Comments Add one by sending me an email.