Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've got some problems with the keyboard layout. I have a french AZERTY keyboard. When I switch to another layout (I tested both programmer DVORAK and Greek) everything seems fine. However, in emacs, I have a more unexpected (at least for me) behavior.

For example, in DVORAK, I thought to obtain:

On my french Keyboard -> DVORAK

X -> Q

Alt-X -> Alt-Q

But I have:

X -> Q

Alt-X -> Alt-X

When I press the Alt key, the layout change seems to be inactivated. I precise I didn't activated any shortcut containing the Alt key for the layout switching. Moreover, I'm not sure this behavior is restricted to Emacs, but I don't use shortcuts like Alt-... in another application. Is a such behavior normal ? And in this case, how can I use a shortcut like Alt-Q when I switch to DVORAK ?

share|improve this question
    
Questions about multiple keyboard layouts are always confusing. Do you mean that you expect to hit the same keys in both cases, or the same characters in both cases? If the former (you expect to hit Alt+[the-key-marked-X-just-above-Alt] both times), have a look at this question –  pconley Jun 1 '12 at 18:07

1 Answer 1

Workaround: Put Dvorak as first layout, not as second or third. At least while using Emacs.

I have the same problem. It also happens in other applications, so I think it is an issue of the whole graphical environment.

For example, in the Firefox tool to find a word in the current page (to use it press Control-F and then type the word), you can check that to find the next appearance (Alt-N) you have to press the physical N key, disregarding the fact that you are currently using Dvorak layout.

So a more precise description of the feature/bug is the following: In the graphical environment, pressing Alt reverts to the primary layout (which is usually the physical layout, that is, when the behaviour of the keys matches the labels of the physical keyboard).

I guess this makes sense for someone since the Alt key is almost exclusively used to interact with the desktop environment, for example Alt+TAB to switch windows, and this is sometimes done without previously placing the hands in the touch-type position. In that case it is useful to be able to locate the key by sight instead of by thought.

I don't think it is effective overall, since for example Control-C is also used very often to copy text that has been selected with the mouse, so in this case users will still have to locate the C by thought.

Anyway, the real problem comes in mainly when using Emacs, in which the Alt key (called Meta) is used while the hands are in the touch-type position. For example you press M-x to enter a command by name, M-b to move backwards by a word, M-e to move to the end of the sentence, etc..

In my case, I have a Spanish physical keyboard and use Spanish as first layout and Dvorak Spanish as second layout. I touch-type Dvorak, but want the system to start with the behaviour of the keys matching their label since it would be otherwise annoying, especially to other users. So it seems that in Ubuntu 12.04 I have to drop this pretension to have a usable Emacs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.