[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wish: right alt/meta to switch keyboard layout while pressed
From: |
Juri Linkov |
Subject: |
Re: wish: right alt/meta to switch keyboard layout while pressed |
Date: |
Wed, 23 Nov 2005 08:07:14 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> So, if I want to type an apostrophe from Russian keyboard layout, I
> have to type `C-\ ' C-\'. If, however, the temporary-switching was
> implemented, I could do with `press-right-alt ' release-right-alt',
> which is obviously much easier.
>
> As far as I can tell, Emacs currently just ignores the right Alt.
>
> Can this be implemented easily?
I think the most natural way to do this in Emacs is to use C-q.
So to quote ' in an input method and not to translate it, you could
use C-q '.
However, this currently doesn't work. C-q inserts a translated
character, and while C-q together with an input method read an input
sequence, the intermediate display in the echo area is quite messy.
It seems `quoted-insert' (C-q) attempts to do something with this
situation, and it let-binds `translation-table-for-input' to nil
before reading a quoted character, but this doesn't work for quoting
characters in input methods. I propose the following patch to let-bind
`input-method-function' to nil as well.
Index: lisp/simple.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v
retrieving revision 1.769
diff -c -r1.769 simple.el
*** lisp/simple.el 20 Nov 2005 18:08:55 -0000 1.769
--- lisp/simple.el 23 Nov 2005 06:04:04 -0000
***************
*** 609,615 ****
digits are interpreted as a character code. This is intended to be
useful for editing binary files."
(interactive "*p")
! (let* ((char (let (translation-table-for-input)
(if (or (not overwrite-mode)
(eq overwrite-mode 'overwrite-mode-binary))
(read-quoted-char)
--- 610,616 ----
digits are interpreted as a character code. This is intended to be
useful for editing binary files."
(interactive "*p")
! (let* ((char (let (translation-table-for-input input-method-function)
(if (or (not overwrite-mode)
(eq overwrite-mode 'overwrite-mode-binary))
(read-quoted-char)
--
Juri Linkov
http://www.jurta.org/emacs/
- wish: right alt/meta to switch keyboard layout while pressed, Paul Pogonyshev, 2005/11/22
- Re: wish: right alt/meta to switch keyboard layout while pressed,
Juri Linkov <=
- Re: wish: right alt/meta to switch keyboard layout while pressed, Stefan Monnier, 2005/11/24
- Re: wish: right alt/meta to switch keyboard layout while pressed, Paul Pogonyshev, 2005/11/24
- Re: wish: right alt/meta to switch keyboard layout while pressed, Stefan Monnier, 2005/11/24
- Re: wish: right alt/meta to switch keyboard layout while pressed, Paul Pogonyshev, 2005/11/25
- Re: wish: right alt/meta to switch keyboard layout while pressed, Stefan Monnier, 2005/11/25
- Re: wish: right alt/meta to switch keyboard layout while pressed, Paul Pogonyshev, 2005/11/25
- Re: wish: right alt/meta to switch keyboard layout while pressed, Aidan Kehoe, 2005/11/25
- Re: wish: right alt/meta to switch keyboard layout while pressed, Paul Pogonyshev, 2005/11/26
- Re: wish: right alt/meta to switch keyboard layout while pressed, Tomas Zerolo, 2005/11/27
- Re: wish: right alt/meta to switch keyboard layout while pressed, Eugene Vlasov, 2005/11/26