LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Keyboard map used by X is different to that used in shell ? (https://www.linuxquestions.org/questions/slackware-14/keyboard-map-used-by-x-is-different-to-that-used-in-shell-101809/)

Raptor Ramjet 10-08-2003 06:01 PM

Keyboard map used by X is different to that used in shell ?
 
Hello,

I've been looking for the answer to this question for a couple of days now and am getting nowhere... so it's back to the forums again.

I've got a problem on my Slackware 9.1 box in that when I boot the machine the correct UK keyboard map is being used but as soon as I startx the keyboard becomes mapped as being a default US keyboard. This happens whether I start KDE, GNOME, XFCE etc. etc.

Needless to say this is completely doing my head in as whilst I'm in an X session I have to continually remember that the "#", "|", and " keys are not mapped to the correct keyboard keys which makes working in an terminal window and (especially) editing my config files most "interesting" :mad:

At this point I should mention that my /etc/rc.d/rc.keymap file looks like this:

#!/bin/sh
# Load the keyboard map (etc. etc.)
if [ -x /usr/bin/loadkeys ] ; then
/usr/bin/loadkeys uk.map
fi

When I'm in a terminal window in X then if I call "loadkeys uk.map" directly this makes no difference.

So I'd be most interested to find out what is causing X to use a different keymap and what I can do about it ?

All answers most welcome....

uday 10-09-2003 05:10 PM

I have the same problem, but I on the other hand want a swedish keymap

slacknoob 10-09-2003 08:19 PM

Same problem here for a Brazilian keyboard (qwerty-br-abnt2). I´ve already posted a message about this problem, among others i´m having.



Thanks.

Raptor Ramjet 10-13-2003 06:01 AM

Answering my own post
 
Hello,

Well I've found how to set up the keyboard to use a UK map so I think I've got 90% of your solutions for you.

After much rooting around I found it was "simply" a matter of editing the /etc/X11/XF86Config file which has a section for keyboard layout in it. My original version looked like this:

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
EndSection

All I had to do was edit it to add an "Option" line so the section in my file now looks like this:

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbLayout" "uk"
EndSection

So I presume you'll just need to find what the relevant code for Svenska and Portugese are (sorry but I don't know)

Hope this is of use.

kevlong 10-13-2003 07:29 AM

Re: Answering my own post
 
Quote:

Originally posted by Raptor Ramjet
Hello,

Well I've found how to set up the keyboard to use a UK map so I think I've got 90% of your solutions for you.

After much rooting around I found it was "simply" a matter of editing the /etc/X11/XF86Config file which has a section for keyboard layout in it. My original version looked like this:

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
EndSection

All I had to do was edit it to add an "Option" line so the section in my file now looks like this:

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbLayout" "uk"
EndSection

So I presume you'll just need to find what the relevant code for Svenska and Portugese are (sorry but I don't know)

Hope this is of use.

Or even since you will be in KDE, etc...You could use one of the graphical tools to setup Keyboards, Mice, Monitors, etc. I'll have to check whether these tools actually update XF86Config, but I think that they do.

slacknoob 10-13-2003 10:23 AM

Thanks, it worked for me. For those Brazilian guys with the same problem, here it goes (abnt2 keyboard only):

...
Option "XkbLayout" "pt-br"
...



Thanks.


All times are GMT -5. The time now is 02:17 PM.