Fonts and keymaps for the linux console
=======================================

Starting from linux 2.6.17, one can type braille patterns directly on the
text console.

This permits to type raw braille patterns: they will show up as braille dots on
the screen, and if you send them within files or mails to people, they will read
exactly the same pattern as you typed.  No interpretation ("this is an 'A'" for
instance) will be done.

But for this, unicode environment, fonts and keymaps are needed.

Unicode environment
-------------------

Your environment needs to be configured in Unicode mode (aka UTF-8).  Recent
distributions are configured this way.  If you don't know what this means, check
that

locale charmap

returns UTF-8.  If it does not, please read documentation from your distribution
for configuring a unicode environment.  Note: this will change the way accented
letters etc. will work.

On Debian, run

dpkg-reconfigure locales

and select a UTF-8 version of your locale, then enable it by default.  Reboot to
get things configured.

Fonts
-----

Run

  setfont lat9-16 brl-16

This will load 16-pixel height latin9 and braille pattern fonts into the text
console.

Keymaps
-------

Keymaps for various machine types are given in keymaps/.  They will hopefully be
included in distributions.  With them, you need to hold left and right alt keys
(AKA alt and altgr keys) pressed, and then use asdfjkl; keys (or qsdfjkml keys
on an azerty keyboard, etc.) for typing braille patterns just like you would use
a usual braille device.

But for more advanced keymaps, run

  make

That will create the setbrlkeys program, which sets braille keymaps for PC
keyboards: it sets the "pause" key (the one around the topright corner of the
keyboard) as a "braille lock" key, to activate the following braille keymaps:

- [qa]sdfjkl[m;] are bound to dots 73214568
- 01456+ are bound to dots 321456
- ghvn are bound to the empty pattern

If you give the -l parameter to setbrlkeys, it will bind [qa]sdfbv to 321456.
If you give the -r parameter to setbrlkeys, it will bind jbnkl[m;] to 123456.

Unfortunately, some bad keyboards (like laptop ones) don't like several keys to
be pressed at once.  In such case, you can try to run

  echo -1 > /sys/module/keyboard/parameters/brl_timeout

This will make your keys produce "dead" dot patterns: just type your dot pattern
one dot after the other, and finish the braille pattern by typing space.

FAQ
---

Q- When I press pattern, nothing is display, but "keyboard mode must be unicode
for braille patter" is output in Linux's dmesg.
A- Your distribution forgot to notify the kernel that it is using unicode.  For
loading the font, instead of using setfont, use:

unicode_start lat9wbrl-16.psf lat9wbrl.uni

Q- The patterns are incomplete, some dots are missing
A- Maybe your keyboard is just bad.  Laptop for instance often have keyboards
whose keys are not very independant, and thus Linux just can not detect all
presses.  There is nothing which can be done but choose a different layout, or
buy a better keyboard...
