Saturday, July 3, 2010

Re: How to map release of keys? Needed to use vim as braille-readyeditor

On 03/07/10 05:49, Benjamin R. Haskell wrote:
> On Fri, 2 Jul 2010, Benjamin R. Haskell wrote:
>
>> On Fri, 2 Jul 2010, Tony Mechelynck wrote:
>>
>>> Maybe write (if it doesn't yet exist) a keymap from Latin to the
>>> Braille patterns at Unicode codepoints U+2800 to U+28FF?
>>
>> Hmm. That's much easier than typing individual dots.
>>
>> Attached is a Braille keymap[1]. Install it as
>> ~/.vim/keymap/braille.vim and run :set keymap=braille
>>
>> It maps the following characters to their standard interpretation:
>>
>> abcdefghijklmnopqrstuvwxyz,.;?-
>>
>> <Space> is mapped to the blank pattern.
>> " is mapped to close-quote (since '?' is the same as open-quote)
>> [, ], (, ), {, and } are mapped to the bracket character
>>
>> & is mapped to Grade-2 'AND'.
>> 'sh', 'th', 'ch', and 'st' are mapped with a preceding '|' character
>> to their Grade-2 contractions:
>> so:
>>
>> This input:
>> the quick brown fox jumped over the lazy dog; or, did he?
>> te|sting |checking i wi|sh |this worked.
>>
>> Becomes:
>> ⠞⠓⠑⠀⠟⠥⠊⠉⠅⠀⠃⠗⠕⠺⠝⠀⠋⠕⠭⠀⠚⠥⠍⠏⠑⠙⠀⠕⠧⠑⠗⠀⠞⠓⠑⠀⠇⠁⠵⠽⠀⠙⠕⠛⠆⠀⠕⠗⠂⠀⠙⠊⠙⠀⠓⠑⠦
>> ⠞⠑⠌⠊⠝⠛⠀⠡⠑⠉⠅⠊⠝⠛⠀⠊⠀⠺⠊⠩⠀⠹⠊⠎⠀⠺⠕⠗⠅⠑⠙⠲
>>
>> Disclaimer: all of my Braille knowledge is via Wikipedia, except for the
>> Unicode range (which is via Tony's last email).

I found it by searching for "braille" in the index of codepoint names,
http://www.unicode.org/charts/charindex.html

>>
>> I think there's a way to nicely toggle keymaps, but I haven't looked.
>>
>
> Updated the version on my site to handle capital letters (again, just
> going by what Wikipedia said: e.g. 'A' -> '⠠⠁').
>
> http://benizi.com/vim/braille.vim

Hm. In French, at least, in "classical" six-dot Braille, uppercase is
prefix-46, so A would be ⠨⠁ (2 characters). Don't forget the numbers
("International" or "Louis Braille" numbers, jabcdefghi with prefix-3456
[where 248008 is ⠼⠃⠙⠓⠚⠚⠓], or "French" or "Antoine" numbers, with added
6-dot, "math prefix" 6-dot-alone, and the digit zero is represented by
the Louis Braille numeric prefix, not j plus dot-6 i.e. w [where 24808
is ⠠⠣⠹⠳⠼⠼⠳]).

About the "official" Braille for French (France, Belgium,
French-speaking Africa, Switzerland and Canada) see
http://www.avh.asso.fr/download.php?chemin=rubriques/infos_braille/dwnld/&filename=CBFU_edition_internationale.pdf
which I found from a link near the bottom of
http://fr.wikipedia.org/wiki/Braille ; that document doesn't (yet)
handle "abbreviated Braille" where whole words, or parts of them, are
represented by individual symbols. More than half of its 136 pages are
about Braille text layout (pages 3-5: table of contents; 7-24:
introduction and character tables; 25-40: first part, basic Braille
code; 41-56: second part: additional rules; 57-136: layout of Braille
texts).

>
> Also added maintainer info. I can send a patch against the hg repo to
> vim-dev when I get back tomorrow. But, I'd prefer to get some feedback
> from people who actually know about Braille. (And maybe a better key
> for the contractions 'leader'. E.g. '/sh' might be easier to type than
> '|sh'. Or maybe even use'<Leader>' itself, so it's configurable?)

On my Belgian keyboard, \ and | but not / require the use of AltGr, see
http://users.skynet.be/antoine.mechelynck/other/keybbe.htm for details.

>
> If someone can point me to more Braille contractions, or an example of
> where this was done before (an X11 or a Windows Braille keymap, to see
> what people might expect), that'd also be good.
>

Best regards,
Tony.
--
I don't care for the Sugar Smacks commercial. I don't like the idea of
a frog jumping on my Breakfast.
-- Lowell, Chicago Reader 10/15/82

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: