Sunday, October 11, 2015

Re: Alternative keymaps [Was: vim and touch typing]

On Fri, 9 Oct 2015 12:02:53 +0200 BPJ <bpj@melroch.se> wrote:

> fredag 9 oktober 2015 skrev Erik Christiansen <dvalin@internode.on.net>:
>
> > On 08.10.15 20:33, Gevisz wrote:
> > > In this connection I have only one inconvenience connected with the
> > facts that
> > > 1) I usually have to use 3 keyboard layouts at the same time switching
> > > between them with a hot key,
> > > 2) it is impossible to have a "direct hot key switch" to a certain
> > > keyboard layout in Linux world.
> >
> > It is very risky to say that anything is impossible in linux; it usually
> > turns out that there are at least three ways to do what one at first
> > thinks impossible. My first reaction to your problem was to suggest
> > several files to switch to ~/.Xmodmap, and then find out if a SIGHUP to
> > X would make it reread its config.
> >
> > Much easier, by appearances, is Tony's suggestion. A quick look at
> > ";h keymap", leading to ";h mbyte-keymap", looks very promising, not
> > least since there are many ready-to-use mappings:
> >
> > $ locate -r 'keymap.*vim' | wc -l
> > 130
> >
> > That, though, only maps in Vim, and only during text insertion.
> > (which may be just what you want)
> >
> > If cross-application mapping is desired, though, then an alternative to
> > ~/.Xmodmap is to just execute (several of) something like:
> >
> > $ xmodmap -e 'keycode 91 = 0x2c' # Change numeric pad '.' to ','
> >
> > in a shell script, after using xev to elucidate the keycode and keysim of
> > all the keys you want to remap.
> >
> > For me, this reverts the above mapping:
> >
> > $ xmodmap -e 'keycode 91 = 0x2e' # Change numeric pad ',' to '.'
> >
> > OK, that's three ways. Time to stop.
> >
> > Erik
> >
> > <https://github.com/bpj/vim-ToggleKeymap>
>
> I have a hack to ease switching keymaps:
>
> https://github.com/bpj/vim-ToggleKeymap

Thank you for providing a link to your plugin. I have looked at it briefly
but so far have not understand if it provides the way to switch to a given
keyboard layout directly or only by circling/toggling.

By a direct keyboard switch I mean the way to switch to a certain keyboard
layout irrespectively of the its initial state. For example, I need a (configurable)
hot key to switch to a Cyrillic keyboard layout if I am currently in the English
keyboard layout and to do nothing if I am already in the Cyrillic keyboard layout.

P.S. I do know that is possible with a bit scripting. I am just asking if your
plugin can do it out of the box.


--
--
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/d/optout.

No comments:

Post a Comment