LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   German keyboard layout (https://www.linuxquestions.org/questions/linux-desktop-74/german-keyboard-layout-775614/)

makowka 12-14-2009 02:08 PM

German keyboard layout
 
Hi folks

I have a small problem switching to the german keyboard layout. Usually I use the polish layout as default, but from time to time I need to use the german keyboard. I have Debian Lenny installed. I have everything set up to work in xorg.conf, here is a snippet:

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "pl,de"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection



The problem is, that when I switch to german, I get all the umlauts, ö, ä etc., but when I press for example r, I get this: ¶. With d: ð. That is, I get symbols instead of latin letters. What could be wrong here?

Best regards
Szymon

DavidMcCann 12-15-2009 10:25 AM

What's happening is that the computer is behaving as if AltGr is held down, but it's difficult to see why!

The simplest solution may be to type German from your Polish keyboard. If you enable the Compose key (using the Windows Menu or anything convenient), then you have the sequences

Compose + a + " gives ä
Compose + U + " gives Ü
Compose + s + s gives ß

and so on.

JZL240I-U 12-16-2009 03:52 AM

Quote:

Originally Posted by DavidMcCann (Post 3792399)
...If you enable the Compose key (using the Windows Menu or anything convenient)...

What is the "compose key" (not the "any key" I trust :p)? And what do you mean with "Windows Menu or anything convenient" under linux :scratch:.

DavidMcCann 12-16-2009 12:31 PM

The Compose Key (described in Wikipedia and on this site's wiki) is an escape key. After you press it, the input modules checks the following keystrokes in a list to see if they are a code for something else. It's the traditional Unix method for getting characters that are not on the keyboard. So, on a keyboard without "{" you can still get that character with the sequence
Compose - (

A PC keyboard obviously lacks a Compose key, but you can select another key to use as one. If you have the Gnome desktop, enter the menu under System - Preferences - Hardware - Keyboard. Or, if you have the keyboard language indicator on the panel, right-click on it and select the option Keyboard Preferences. In the window, chose the tab Layouts, then the button Layout Options. The third item is Compose key position, which offers seven choices. I think most people choose the Windows Menu key, as it's not much use in Linux.

JZL240I-U 12-17-2009 02:50 AM

Thank you for this detailed answer :).

makowka 12-18-2009 02:38 PM

Hi all

Finally, I found a solution to my problem. I asked on another forum and was advised to type the following in the keyboard section of xorg.conf:

Option "XkbOptions" "lv3:ralt_switch"


Now the whole section looks like this:

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "pl,de"
Option "XkbOptions" "grp:alt_shift_toggle"
Option "XkbOptions" "lv3:ralt_switch"
EndSection



This did the thing. Thanks everyone for help.

makowka 12-20-2009 01:31 PM

The solution was working, but only temporary. After reboot everything is the old way. Could this be a bug in xorg?

j1alu 12-21-2009 03:38 PM

doing it manually does work?
setxkbmap de
sextkbmap pl
if yes xorg is wrong, if not you might be missing something else.
greetings

makowka 12-22-2009 12:25 PM

1 Attachment(s)
Yes, with setxkbmap everything works fine. It really seems, that xorg is thinking, that alt-gr is pressed all the time if I switch to german. I dont't know, if this could be a clue, but I had the following error message from xorg:

Code:

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                    Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server

I read somewhere, that this warning has to do with the files "altwin" and "level3" in /usr/share/X11/xkb/symbols (possibly a conflict, I am not that good to say something more). Here is a link to a polish site, with explanation, how to fix this message:

http://forum.pld-linux.org/viewtopic.php?t=643

You can see some piece of code there, maybe it is a help.


I wouldn't bother, if I could switch to german with setxkbmap (I wrote a small bash script for that, see the attachment), but then I can't manage the keyboard layout independent for every window (that is, if I switch to german, all newly open programs will have the german layout, it is not possible to switch to polish again, until I issue setxkbmap in the terminal). It must be a bug in xorg, I am quite sure now (in Etch and Slackware switching languages worked like it was supposed to). Maybe this has something to do with the installed locales? I have both needed locales installed.

I know, that many people are facing now the same problem with Lenny, so it must be definitely a bug.


All times are GMT -5. The time now is 07:34 PM.