23 October 2008

The attack of the keybore nerds...

A real nerdy one, this, prompted by a flurry of enquiries about something which took me a while to (more or less) solve. If you are completely happy with (or have no need of) accented and other “special” characters in Windows/PC environment programs (word processor, spreadsheet, email, whatever) and on the Asus eeePC, skip it and move on. Otherwise, you may or may not find something useful to you.

On the Windows PC, one approach is to replace some programs with ones that do it properly in the first place. If you are only (or overwhelmingly) concerned with word processing, Nota Bene and WordPerfect both offer everything you need: they are the best tools around, and both will happily save your work to RTF or Microsoft Word's DOC file formats. If you want the richest writing environment (especially if you plan on using considerable quantities of nonRoman text), Nota Bene is the way to go. If you want a complete office suite (word processor, spreadsheet, presentations, email, maybe relational database) with the same facility, then WordPerfect Office is probably the better choice.

If, on the other hand, you have to (or even choose to) use other tools like Microsoft Office, then you need the free and open source AllChars utility which enables a Unix-style compose key approach in any Windows program. Tap a designated key (the Control key, by default, but you can change that; I personally use the Windows "menu" key) followed by a two character mnemonic and you get your chosen character. You can change the mnemonics, too, if you want to; I've altered a couple to bring them into line with WordPerfect's own mnemonics. Here are a few examples:

If you want to type this... ...use these keys
(e-acute) é Ctrl e '
(e-grave) è Ctrl e `
(e-circumflex) ê Ctrl e ^
(multiply) ×
Ctrl x x
(divide) ÷ Ctrl : -
(plus or minus) ±
Ctrl + -
(interpunct or decimal point) · Ctrl . .
(degree symbol) ° Ctrl d g
(AE ligature) Æ Ctrl A E
(German "double s") ß Ctrl s s

AllChars was updated considerably in release 4, to be even more convenient and useful than before, and release 5 is currently in alpha testing.

To get the same results on a Linux-installed Asus eeePC, you will usually be advised to do various command line stuff. It seems to work for some people, but not (so far) for me. Here's my alternative solution which is not quite perfect but does work. There are two stages: setting up, and using.

Setting up means telling the machine the options you want to use. It's a one of process, you won't have to do it again.

  1. Start by pressing Ctrl-Alt-T, followed by the [enter] key, (which will open a terminal – similar to a "DOS box" in Windows).
  2. Now type sudo followed by [enter] (this ensures access to everything you need)
  3. Next type kcontrol and [enter] – this opens a nice graphic control panel, and you don't have to bother with the terminal any more. There are a lot of things you can do in this panel, but we'll stick to special characters for now.
  4. In the left hand menu pane, click Peripheral Devices then (in the expanded list which drops down) Keyboard Layout.
  5. Click the Xkb tab above the right hand pane.
  6. Scroll down the options offered (you will have to use the mouse wheel simulator – put your finger hard up against the right hand side of the touch pad, and slide downwards) until you find Compose Key. Tick the box next to it.
  7. Below that, you will find six options for your choice of which key to use as your compose key, but only three of them (Right Menu, Left Windows and Caps Lock) are available on the eeePC's keyboard. Tick one of them. (I chose Menu is Compose, for compatibility with my choice in AllChars under Windows, but it's up to you.)
  8. Now scroll up a little bit, find key Compose key position, and tick its box.
  9. Click Apply.
  10. You have now set up the equivalent of AllChars under Windows. You can exit or, if you wish, while you are in here, you can set up another option – using an international version of your chosen keyboard. This will give alternative access to a lot of accented characters through so called "dead keys". Both methods can be used together, or separately.
  11. At the top of the control panel, lick the Layout tab.
  12. Select Enable keyboard layouts and ensure that the one you want (in my case, United Kingdom) is selected.
  13. Using the side and bottom scroll bars (the panel is too big for an eeePC screen, really) go to the bottom right of the panel. Here you will find Keyboard variant. Change this to Intl.
  14. Click Apply, and close the KDE Control Centre down.

If you now go to anything that accepts keyboard text input (OpenOffice Writer, for example), you will find that tapping your chosen compose key, then ^o, will produce an o-circumflex (ô) on the screen.

If you chose an international keyboard variant in steps 10 & 11 above, you can enter the same thing by just tapping ^ (it won't appear on screen) then "o". Some of your keys (like ^ and ` and ') will now only enter if you tap them twice; but large quantities of French accenting are quicker and easer to enter this way than with the compose key.

So far so good ... but, shut your eeePC down and next time you switch it on you will find that the changes are lost. Don't despair, though ... it's much quicker to get the back than it was to set them up.

To use the compose key:

  • Open the terminal with Ctrl-Alt-T, then press the up arrow (bottom right of the keyboard). Unless you've done something else in the meantime, the word kcontrol will immediately appear; press [enter] to open the control panel.
  • Follow only steps 4, 5, 8 and 14 above.

To use an international variant of your keyboard:

  • Once again, open the terminal with Ctrl-Alt-T, then press the up arrow followed by [enter].
  • Follow only steps 13 and 14 above.

One final tip: if you only want to accent characters in a few frequently used words, use the auto correct facility (available in most word processors) to replace the unaccented form with the accented one. For instance, tell it that when you type "fiancee" it should be auto replaced with "fiancée".

Oh yes ... and if you are using Nota Bene or WordPerfect on your PC but the excellent Open Office Writer on your eeePC, then reassign the relevant keystroke in OOW (F6 or Ctrl-W, respectively) to bring up the symbol table.

No comments: