Friday, July 2, 2010

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

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 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

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?)

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,
Ben

--
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: