Saturday, December 28, 2013

Re: Is it possible to map dead keys (accents) in Normal mode?

On 28/12/13 10:35, Alexey wrote:
> Hello,
>
> i am using a Canadian Qwerty keyboard layout with dead keys for entering "^" and "¨" accents. For example, typing what would be "[o" in US Qwerty produces "ô".
>
> Is it possible to map a dead key in Vim (in Normal mode for example)? I would like to remap the keyboard so that pressing the US Qwerty <[> key acts as "[" even in Canadian layout.
>
> Thanks,
>
> Alexey.
>

It is not possible to map only the dead key, because when you hit it the
keyboard interface (part of your OS or of X11 or…) sends nothing to Vim,
it waits until you hit the next key. You can map â ê î ô û ŷ or even, if
your keyboard will generate them, ĉ ĝ ĥ ĵ ŝ, as well as all their
uppercase counterparts. I don't know what Canadian QWERTY looks like,
but French and Belgian AZERTY have the o two keys left of the dead-key
circumflex and diaeresis, so it ought to be rather easy to produce ô or
Ö. Or maybe hitting the dead-circumflex twice will produce a
spacing-circumflex? With me (with fr_BE keyboard and UTF-8 locale on
Linux) it does.

Here, [ (which is not a dead key) is AltGr+deadkey-^, ] is AltGr+$ (just
to the right of the dead key), and for Ctrl-] (which is used a lot in
Vim) rather than Ctrl+AltGr+$, which would be troublesome, I use the
following mappings:

:map <F9> <C-]>
:map! <F9> <C-]>


Best regards,
Tony.
--
But this has taken us far afield from interface, which is not a bad
place to be, since I particularly want to move ahead to the kludge.
Why do people have so much trouble understanding the kludge? What
is a kludge, after all, but not enough K's, not enough ROM's, not
enough RAM's, poor quality interface and too few bytes to go around?
Have I explained yet about the bytes?

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment