[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Swapping default input method: why so complicated?
From: |
Pascal J. Bourguignon |
Subject: |
Re: Swapping default input method: why so complicated? |
Date: |
Wed, 08 Dec 2010 15:36:09 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Mon, 15 Nov 2010 14:55:55 +0100 pjb@informatimago.com (Pascal J.
> Bourguignon) wrote:
>
> PJB> Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:
>>> I'm trying to do what I consider a very typical requirement: swap two
>>> values of default input method. Unfortunately, I could not find any
>>> documented solution (outside of info-manuals, just using f1 v and f1
>>> f). To get it working, I was forced to inspect the sources... Is
>>> there a simpler solution?
>
> PJB> What is complicated in typing C-\ which is bound to
> PJB> toggle-input-method by default?
>
> PJB> You just use:
>
> PJB> M-x set-input-method RET cyrillic-yawerty RET
> PJB> M-x set-input-method RET cyrillic-jcuken RET
>
> PJB> to select your two input methods, and then type C-\
>
> That only toggles the last input method that was set. Hence my
> suggestion about cycling (by explicit command or implicitly by setting
> the input method to a list).
Actually, I mostly write in English. Sometimes in French or Spanish,
but then I keep the English keyboard and either use the compose key to
put accents on letters, or use C-x 8 stuff.
When I need to enter chinese, cyrillic, greek or hebrew characters, I
switch to the wanted input method with commands I bind to C-f9, C-f10,
C-f11, and C-f12.
(global-set-key (kbd "C-<f9>") (lambda()(interactive)(set-input-method
'chinese-py-b5)))
(global-set-key (kbd "C-<f10>") (lambda()(interactive)(set-input-method
'cyrillic-yawerty)))
(global-set-key (kbd "C-<f11>") (lambda()(interactive)(set-input-method
'greek)))
(global-set-key (kbd "C-<f12>") (lambda()(interactive)(set-input-method
'hebrew)))
and then I use C-\ to switch back to the initial input method.
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
Re: Swapping default input method: why so complicated?, Stefan Monnier, 2010/12/08