Jan 292011
 

In the dim and distant past when keyboards were enclosed in metal cases and you certainly didn’t tuck one under the arm and walk around with it (actually I don’t do now either), the placement of many keys was continually up for debate. But apart from the main QWERTY section, one of the key placements you could rely on was the Control key next to the “A” key. These days it’s been turned into one of those silly CapsLock keys.

Back when I previously did some keymapping, I neglected to mention how I mapped CapsLock into a Control key. As appropriate punishment, changing window managers has somehow meant that my previous mapping had been lost. So I had to figure out how to do it again.

First thing to do is to switch to a text console – I’ll be mapping this at a very low level.

Next thing to do is to find out the scancode of the key I want to map :-

# showkey -s

One started I have to press the key I am interested in within 10 seconds or the program will edit. I press CapsLock and I get two numbers displayed – 3a and ba (they’re in hexadecimal for the base-16 challenged). The first is the key press, and the second is the key release. We can discard the second as Linux is clever enough to figure out one from the other.

The next thing we want to do is to obtain the keycode of the key that we want to map to – in this case the left control key. It probably doesn’t matter here, but it is worth noting that the left and right control keys are different scancodes and keycodes. So you could map then to different things. Anyway, to obtain the keycode of the key we want, run :-

# showkey -k

And press the key to map to.

Lastly we want to construct the command to actually do the mapping :-

setkeycodes 3a 29

This of course has to be added to a script being run when the system boots – you want this mapped as early as possible.

Jul 122009
 

I’m very fussy about keyboards; perhaps ridiculously so. But I cannot understand the criticism of the virtual keyboard that comes with the iPhone. It takes some getting used to, and the auto correct feature whilst very useful can also be very irritating. Enough so that Apple should probably have a keyboard button marked “turn off auto correct for a while”. But it is perfectly adequate for what it is  – something to do a little text entry from time to time.

So why am I complaining about the lack of a decent keyboard ? Because quite simply if I’m doing any writing (and I don’t at present) on the iPhone, I would like to be able to type at full speed – which for me requires a decent clicky keyboard so I can get up to a reasonable speed (apparently about 120wpm!).

Adding bluetooth drivers to the iPhone should be pretty trivial for Apple after all there are already OSX bluetooth keyboard drivers available, and the iPhone operating system is OSX. So why does Apple not include one ? Sure there’s an excuse for the first release not to include one – Apple wanted to make sure that the phone was rock solid in a totally new market to them. But now?

Surely it cannot be because they feel that releasing such a driver would be an admission that the virtual keyboard is no good. After all, I’m not exactly an enemy of the virtual keyboard, but I want a real keyboard interface for those occasions when one would be useful.