On 09/04/09 11:02, Anton Sharonov wrote:
>
>> On 9 апр, 12:22, Anton Sharonov<[email protected]> wrote:
>>> Can the following be the solution for you: disable system-wide
>>> xmodmap mapping _for_"en_US"_layout_only_, so that VIM sees real
>>> keypad keys and do what you want entirely in VIM; keep xmodmap
>>> mappings for system-wide "ru" keyboard layout for other apps ?
>
> 2009/4/9 netimen<[email protected]>:
>>
>> This idea sounds great. But how can I disable the system-wide mapping
>> for en_US only?
>>
>
> Hmmm. The ready answer I don't have. Just as an idea is may be to
> look for some possibilities to hook into "setxkbmap" mechanism
> and run you own script after changing the system-wide keyboard
> layout... But how to do it exactly I don't know. If you can run
> your own script after each change of layout, you can use
> something like
>
> xmodmap ~/.Xmodmap-post-enUS
>
> and
>
> xmodmap ~/.Xmodmap-post-RU
>
> , with corresponding mappings for keypad keys - but this is of
> course an obvious part... Sorry, we probably need some XWindow
> expert here for that method. If nobody will jump in, I can share
> my (untested) naive attempt:
>
> <switch_to_enUS>
> #!/bin/sh
> setxkbmap 'us'
> setxkbmap -option
> xmodmap ~/.Xmodmap-post-enUS
> </switch_to_enUS>
>
> <switch_to_RU>
> #!/bin/sh
> setxkbmap 'ru (winkeys)'
> setxkbmap -option
> xmodmap ~/.Xmodmap-post-RU
> </switch_to_RU>
>
> If you map those two scripts to some key combinations in your
> window manager...
>
Wouldn't that switch keyboards for all X applications at once? It would
be nicer to switch for one app at a time -- well, as I said elsewhere,
"na bezrybie i rak ryba".
Best regards,
Tony.
--
"Consequences, Schmonsequences, as long as I'm rich."
-- "Ali Baba Bunny" [1957, Chuck Jones]
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---