keyboard switches @ and "


Forum: User Feedback
Topic: keyboard switches @ and "
started by: chuck54

Posted by chuck54 on Dec. 29 2003,22:09
How do i change the keyboard settings in dsl? Right now " @ # and a bunch of other keys are mapped at the wrong places.
Posted by libretto on Dec. 30 2003,01:10
Sounds like your after a UK keyboard map and the US one is enabled by default. If you search the forums, there are details of how to set your keymap permanently (of course only on a HDD install).

Good hunting.

Posted by chuck54 on Dec. 31 2003,20:30
Im not having any luck. I found a thread about keymaps, it said about loadkeys and loadkmap but neither of those seem to work how they are supposed to. Is there a file i can edit directly? Where is this setting actually held?
Posted by davmac on Jan. 11 2004,18:13
Hi,

Being both UK based and a complete novice I've also hit the same problem, but have just figured it out.

Quit X (ctrl-alt-backspace)
type "loadmaps uk.kmap.gz"
type "startx"

...and that did it for me.

HTH,

Dave MacLeod

Posted by TyphoonMentat on Jan. 11 2004,18:57
You can even just type loadkeys uk, I think. However, it only works before you load up X.
Posted by guido on Jan. 11 2004,20:26
Hi All ,

Very important messag : I use a HD DSL system.
But when you will remaster the DSL CD than is this also a possible solution



I was searching a easy (!!!) solution to start DSL with the good keyboard layout.

So i found the following solution :

- locate the file us.kmap.gz (the standard US keyboard layout)
- locate the file azerty.kmap.gz (The keyboard layout that i need ) You must locate youre KMAP .

An other posting learned me to do a CP (copy)

So do
cp /usr/share/keymaps/i386/azerty/azerty.kmap.gz mapname.kmap.gz" /usr/share/keymaps/i386/qwerty/us.kmap.gz



Reboot you're computer

I'm not a Linux Guru so if i'm wrong let me know

Regards ,
Guido

P.S. A good reason to let the world know you're solutions is that if you forgot them, you can find it on the forum :)

Posted by pr0f3550r on Dec. 23 2005,16:30
Quote (davmac @ Jan. 11 2004,13:13)
Quit X (ctrl-alt-backspace)
type "loadmaps uk.kmap.gz"
type "startx"

Actually, it's:
exit X

Code Sample
$ sudo loadkeys uk

Code Sample
$ startx

Posted by winux on Jan. 06 2006,20:31
Quote (davmac @ Jan. 11 2004,13:13)
Hi,

Quit X (ctrl-alt-backspace)
type "loadmaps uk.kmap.gz"
type "startx"

...and that did it for me.

HTH,

Dave MacLeod

Hi everyone

I've got the same problem w/ a French keyboard. The shift key is not working so I can't get the important " @" sign.

Browsing throughout the forum, I've tried 2 suggested things

1- the one here recommended: "loadmaps fr.kmap.gz". The answer was "loadmaps command not found" Prof gave the answer to this

2- Then I went to: /etc/init.d/knoppix-autoconfig
I've tried to change language="us" into "fr" BUT it did not operate, I couldn't make the modification because the file is  READ ONLY , even though I opened it w/ a ROOT Console. How can I go through this???

Whoever could bring me assistance would help me to love this lite linux package.

Thx in advance and Happy New Year

Posted by winux on Jan. 06 2006,21:33
"loadkeys fr" worked great for AZERTY

BUT

NO letter w/ special sign works???

Any idea to solve that??

Have a nice day

Posted by doobit on Jan. 06 2006,21:36
loadkeys command can be placed in /opt/bootlocal.sh to make it load at bootup everytime.
Posted by jls legalize on Jan. 08 2006,15:58
for my italian keyboard
I changed this line of /home/dsl/.xinitrc:
if [ $KEYTABLE == "it" ]; then

Posted by winux on Jan. 08 2006,16:22
Quote (doobit @ Jan. 06 2006,16:36)
loadkeys command can be placed in /opt/bootlocal.sh to make it load at bootup everytime.

Thx doobit, I'll try that after having solved the keyboard Pb on the live CD version!!!
Posted by winux on Jan. 08 2006,17:18
Quote (jls legalize @ Jan. 08 2006,10:58)
for my italian keyboard
I changed this line of /home/dsl/.xinitrc:
if [ $KEYTABLE == "it" ]; then

Hi jls legalize

Thx for your input, BUT how did you do that???

When I go through Beaver or through the Terminal as root, I cannot see this hidden file (I've just got GNUstep and events, that's all !!). What trick did you use???

Thx for sharing your knowledge, have a nice evening  :)

Posted by doobit on Jan. 08 2006,20:08
Quote (winux @ Jan. 08 2006,11:22)
Quote (doobit @ Jan. 06 2006,16:36)
loadkeys command can be placed in /opt/bootlocal.sh to make it load at bootup everytime.

Thx doobit, I'll try that after having solved the keyboard Pb on the live CD version!!!

That doesn't matter, if you are backing up your settings you can be using the live CD or a frugal install to pendrive or hard drive. Once you get a keymap that works,  you will want it to load every time right? That's how to do it.

The problem for you is to find a keymap that gets you the keys you want in the places on the keyboard that you want them to be. If you have them in some other distribution, then maybe you can find out where the package is available for that. Probably most packages that were built for Debian with the 2.4.31 or earlier kernel can be used with DSL.

Posted by winux on Jan. 08 2006,20:58
Quote (doobit @ Jan. 06 2006,16:36)
1-Loadkeys command can be placed in /opt/bootlocal.sh to make it load at bootup everytime.
2- The problem for you is to find a keymap that gets you the keys you want in the places on the keyboard that you want them to be. If you have them in some other distribution, then maybe you can find out where the package is available for that.


Thx for your follow-up Doobit

Your point 1: I presume this is only for DSL because I've nothing in Ubuntu under opt, even w/ hidden files display


Your point 2: Do you have any idea
a) where I can find the keymap that works so far on Kaella Knoppix and Ubuntu, because w/ these 2 I've no keyboard Pb
b) once I find it, what shall I do w/ it?

As you can see, I'm far from being an expert on Linux, so I need "some kind of" help to go through this major issue (for me).

Thx for your time Doobit. I don't have much solutions on the French forum. I'm still waiting for some answers, but it's Sunday today isn't it!!!

Posted by mikshaw on Jan. 08 2006,22:22
Quote (winux @ Jan. 08 2006,15:58)
Your point 1: I presume this is only for DSL because I've nothing in Ubuntu under opt, even w/ hidden files display

It is only for DSL.  /opt/bootlocal.sh in DSL is equivalent to the local boot script found in /etc/init.d or /etc/rc.d in other systems.  It might be named boot.local or rc.local, or maybe something else.
In DSL it is in /opt because it makes it easier to backup and restore the file this way.

Posted by winux on Jan. 08 2006,23:50
Quote (mikshaw @ Jan. 08 2006,17:22)
It is only for DSL.  /opt/bootlocal.sh in DSL is equivalent to the local boot script found in /etc/init.d or /etc/rc.d in other systems.  It might be named boot.local or rc.local, or maybe something else.

Thx for your support milkshaw

I went, on my Ubuntu (Debian driven), to:

a) /etc/init.d and I found console-screen.sh file w/ some nice keywords, e.g. CHARMAP=`LANG=$LANG LC_ALL=$LC_ALL LC_CTYPE=$LC_CTYPE locale charmap`
   if   test "$CHARMAP" = "UTF-8"
I don't know what it means but looks nice!!

b) /etc/init.d/keymap.sh

I copied down there the 2 files. If you (or Doobit or Roberts or every clever guy) think one of these is the right one, feel free to let me know!!!, I understood I'll then have to put it, in DSL, in Opt and rename it by bootlocal.sh

But let's find the right file first. In the meantime, I thank all the ones who already helped me so far or the ones who ARE GOING TO HELP ME SOON!!!!!!

a) console-screen.sh
Code Sample
#!/bin/sh

#
# This is the boot script for the `console-tools' package.
#
# It loads parameters from /etc/console-tools/config, maybe loads
# default screen-font, screen font-map, and application charset-map,
# and maybe start "vcstime"
#
# (c) 1997 Yann Dirson

# check if usplash is runing and skip this, we'll get run again later
if pidof usplash > /dev/null; then
   exit 0
fi

if [ -r /etc/console-tools/config ]; then
   . /etc/console-tools/config
fi

if [ -d /etc/console-tools/config.d ]; then
   for i in /etc/console-tools/config.d/*; do
      . $i
   done
fi

. /lib/lsb/init-functions

PATH=/sbin:/bin:/usr/sbin:/usr/bin
SETFONT="/usr/bin/consolechars"
SETFONT_OPT=""
CHARSET="/usr/bin/charset"
VCSTIME="/usr/sbin/vcstime"

# Different device name for 2.6 kernels and devfs
if [ `uname -r | cut -f 2 -d .` = 6 ] && [ -e /dev/.devfsd ]; then
   VCSTIME_OPT="-2 /dev/vcsa0"
else
   VCSTIME_OPT=""
fi

# be sure the main program is installed
[ -x "${SETFONT}" ] || exit 0


# set DEVICE_PREFIX depending on devfs/udev
if [ -d /dev/vc ]; then
   DEVICE_PREFIX="/dev/vc/"
else
   DEVICE_PREFIX="/dev/tty"
fi

reset_vga_palette ()
{
if [ -f /proc/fb ]; then
          # They have a framebuffer device.
          # That means we have work to do...
  echo -n "]R"
fi
}

setup ()
{
   VT="no"
   # If we can't access the console, quit
   CONSOLE_TYPE=`fgconsole 2>/dev/null` || exit 0
   if [ ! $CONSOLE_TYPE = "serial" ]  ; then
readlink /proc/self/fd/0 | grep -q -e /dev/vc -e '/dev/tty[^p]' -e /dev/console
if [ $? -eq 0 ]; then
   VT="yes"
   reset_vga_palette
fi
   fi

   [ $VT = "no" ] && exit 0

   # start vcstime
   if [ "${DO_VCSTIME}" = "yes" -a -x ${VCSTIME} ]; then
log_begin_msg "Starting clock on text console: `basename ${VCSTIME}`"
${VCSTIME} ${VCSTIME_OPT} &
log_end_msg $?
   fi


   # Global default font+sfm
   if [ "${SCREEN_FONT}" ]
then
log_begin_msg "Setting up general console font..."
SCREEN_FONT="-f ${SCREEN_FONT}"

# maybe use an external SFM
[ "${SCREEN_FONT_MAP}" ] && SCREEN_FONT_MAP="-u ${SCREEN_FONT_MAP}"
# Set for the first 6 VCs (as they are allocated in /etc/inittab)

if [ -n "$previous" ] && [ -n "$runlevel" ] || [ "$runlevel" = "S" ]; then
 # We're being run from within init, so our VCs may not exist yet
 NUM_CONSOLES=`grep '^[1-9]' /etc/inittab | cut -d ':' -f 1 | sort -n | tail -n 1`
else
 NUM_CONSOLES=`fgconsole --next-available`
 NUM_CONSOLES=`expr ${NUM_CONSOLES} - 1`
fi
for vc in `seq 0 ${NUM_CONSOLES}`
   do
   ${SETFONT} --tty=${DEVICE_PREFIX}$vc ${SETFONT_OPT} ${SCREEN_FONT} ${SCREEN_FONT_MAP} || { log_end_msg 1; break; }
   if [ "$vc" -eq 6 ]; then log_end_msg 0; fi
done
   fi

   # Per-VC font+sfm
   PERVC_FONTS="`set | grep "^SCREEN_FONT_vc[0-9]*="  | tr -d \' `"
   if [ "${PERVC_FONTS}"  ]
then
log_begin_msg "Setting up per-VC fonts..."
for font in ${PERVC_FONTS}
 do
   # extract VC and FONTNAME info from variable setting
 vc=`echo $font | cut -b15- | cut -d= -f1`
 eval font=\$SCREEN_FONT_vc$vc
 if [ X"$QUIET_PERVC" != X1 ]; then
     log_success_msg "${DEVICE_PREFIX}${vc}"
 fi
   # eventually find an associated SFM
 eval sfm=\${SCREEN_FONT_MAP_vc${vc}}
 [ "$sfm" ] && sfm="-u $sfm"

 ${SETFONT} --tty=${DEVICE_PREFIX}$vc ${SETFONT_OPT} -f $font $sfm
done
log_end_msg $?
   fi


   # Global ACM
   [ "${APP_CHARSET_MAP}" ] && ${CHARSET} G0 ${APP_CHARSET_MAP}


   # Per-VC ACMs
   PERVC_ACMS="`set | grep "^APP_CHARSET_MAP_vc[0-9]*="  | tr -d \' `"
   if [ "${PERVC_ACMS}" ]
then
log_begin_msg "Setting up per-VC ACM's..."
for acm in ${PERVC_ACMS}
 do
   # extract VC and FONTNAME info from variable setting
 vc=`echo $acm | cut -b19- | cut -d= -f1`
 eval acm=\$APP_CHARSET_MAP_vc$vc
 if [ X"$QUIET_PERVC" != X1 ]; then
     log_success_msg "${DEVICE_PREFIX}${vc} ($acm)"
 fi
 eval "${CHARSET} --tty='${DEVICE_PREFIX}$vc' G0 '$acm'"
done
log_end_msg $?
   fi


   # Go to UTF-8 mode as necessary
   #
   if [ -f /etc/environment ]
   then
        for var in LANG LC_ALL LC_CTYPE; do
    value=$(egrep "^[^#]*${var}=" /etc/environment | tail -n1 | cut -d= -f2)
    eval $var=$value
done
   fi
   CHARMAP=`LANG=$LANG LC_ALL=$LC_ALL LC_CTYPE=$LC_CTYPE locale charmap`
   if   test "$CHARMAP" = "UTF-8"
   then
       /usr/bin/unicode_start 2> /dev/null || true

   else
        /usr/bin/unicode_stop 2> /dev/null|| true
   fi

   # screensaver stuff
   setterm_args=""
   if [ "$BLANK_TIME" ]; then
       setterm_args="$setterm_args -blank $BLANK_TIME"
   fi
   if [ "$BLANK_DPMS" ]; then
       setterm_args="$setterm_args -powersave $BLANK_DPMS"
   fi
   if [ "$POWERDOWN_TIME" ]; then
       setterm_args="$setterm_args -powerdown $POWERDOWN_TIME"
   fi
   if [ "$setterm_args" ]; then
       setterm $setterm_args
   fi

   # Keyboard rate and delay
   KBDRATE_ARGS=""
   if [ -n "$KEYBOARD_RATE" ]; then
       KBDRATE_ARGS="-r $KEYBOARD_RATE"
   fi
   if [ -n "$KEYBOARD_DELAY" ]; then
       KBDRATE_ARGS="$KBDRATE_ARGS -d $KEYBOARD_DELAY"
   fi
   if [ -n "$KBDRATE_ARGS" ]; then
log_begin_msg "Setting keyboard rate and delay: "
       kbdrate -s $KBDRATE_ARGS
log_end_msg $?
   fi

   # Inform gpm if present, of potential changes.
   if [ -f /var/run/gpm.pid ]; then
kill -WINCH `cat /var/run/gpm.pid` 2> /dev/null
   fi

   # Allow user to remap keys on the console
   if [ -r /etc/console-tools/remap ]
then
dumpkeys < ${DEVICE_PREFIX}1 |sed -f /etc/console-tools/remap |loadkeys --quiet
   fi
   # Set LEDS here
   if [ "$LEDS" != "" ]
then
for i in `seq 1 12`
 do
         setleds -D $LEDS < $DEVICE_PREFIX$i
done
   fi
}

case "$1" in
   start|reload|restart|force-reload)
setup
;;
   stop)
;;
   *)
setup
;;
esac



b) keymap.sh
Code Sample
#!/bin/sh

. /lib/lsb/init-functions

#
# Load the keymaps *as soon as possible*
#

# Don't fail on error
CONSOLE_TYPE=`fgconsole 2>/dev/null` || CONSOLE_TYPE="unknown"

# Don't fail on serial consoles

# fail silently if loadkeys not present (yet).
command -v loadkeys >/dev/null 2>&1 || exit 0

CONFDIR=/etc/console
CONFFILEROOT=boottime
EXT=kmap
CONFFILE=${CONFDIR}/${CONFFILEROOT}.${EXT}.gz

reset_kernel()
{
# On Mac PPC machines, we may need to set kernel vars first
       # We need to mount /proc to do that; not optimal, as its going to
       # be mounted in S10checkroot, but we need it set up before sulogin
       # may be run in checkroot, which will need the keyboard to log in...
[ -x /sbin/sysctl ] || return
[ -r /etc/sysctl.conf ] || return
grep -v '^\#' /etc/sysctl.conf | grep -q keycodes
if [ "$?" = "0" ]; then
   grep keycodes /etc/sysctl.conf | grep -v "^#" | while read d; do
       /sbin/sysctl -w $d 2> /dev/null || true
           done
       fi
}

unicode_start_stop()
{
# Switch unicode mode by checking the locale.
# This will be needed before loading the keymap.
[ -x /usr/bin/unicode_start ] || return
[ -x /usr/bin/unicode_stop ] || return
[ -r /etc/environment ] || return

for var in LANG LC_ALL LC_CTYPE; do
value=$(egrep "^[^#]*${var}=" /etc/environment | tail -n1 | cut -d= -f2)
eval $var=$value
done

CHARMAP=`LANG=$LANG LC_ALL=$LC_ALL LC_CTYPE=$LC_CTYPE locale charmap`
if [ "$CHARMAP" = "UTF-8" ]; then
/usr/bin/unicode_start 2> /dev/null || true
else
/usr/bin/unicode_stop 2> /dev/null || true
fi
}

case "$1" in
   start | restart | force-reload | reload)

      # First mount /proc if necessary.
      unmount_proc="no"
      if [ ! -x /proc/1 ]; then
      unmount_proc="yes"
       mount -n /proc
      fi

# Set kernel variables if required
reset_kernel

       if [ -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes ]; then
          linux_keycodes=`cat /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes`
else
          linux_keycodes=1;
       fi

# load new map
if [ $linux_keycodes -gt 0 ]; then
 if [ -r ${CONFFILE} ]; then

   # Switch console mode to UTF-8 or ASCII as necessary
   unicode_start_stop

   if [ $CONSOLE_TYPE = "serial" ]; then
   loadkeys -q ${CONFFILE} 2>&1 > /dev/null
   else
       loadkeys -q ${CONFFILE}
   fi
   if [ $? -gt 0 ]
then
    # if we've a serial console, we may not have a keyboard, so don't
# complain if we fail.
[ $CONSOLE_TYPE = "serial" ] && exit 0

log_warning_msg "Problem when loading ${CONFDIR}/${CONFFILEROOT}.${EXT}.gz, use install-keymap"
sleep 10
fi
   fi
fi

# unmount /proc if we mounted it
       [ "$unmount_proc" = "no" ] || umount -n /proc

;;

   stop)
# # ensure the saved kernel keymap is removed before halt/reboot
# rm -f ${KERNEL_KEYMAP}
;;

   *)
log_success_msg "Usage: $0 {start|stop|restart|reload|force-reload}"
exit 1
;;
esac

Posted by spock on Jan. 09 2006,17:20
Hello winux,

I'm also discovering DSL, and it appears that when I do a sudo loadkeys fr-latin0 (without sudo I get a permission denied) the French keyboard works perfectly but not in X.

I will try the xkeycaps.dsl extension (in the mydsl repository under System). Remember that even if you find your particular keyboard layout and if it's included on the live CD then someone having a Canadian, Swiss or Belgian French keyboard will still be unhappy because their's will not work perfectly. I'm not sure if following everybody's wishes fits to the idea of keeping the system damn small.

With xkeycaps you can customize the keyboard exactly the way you want it. A little bit of Googling will give you manuals on how to do that.

My keyboard is a qwerty US, but I need to use the French and German keyboards also. In Ubuntu I can do a setxkbmap, but here if I can have my US keyboard with French and German characters then that's even better...

I hope this helps,
Thierry  :)

Posted by winux on Jan. 09 2006,17:50
Quote (spock @ Jan. 09 2006,12:20)
Hello winux,

I'm also discovering DSL, and it appears that ...
I hope this helps,
Thierry  :)

Hi Thierry

I like your positive answer and I of course don't want to disturb this wonderful package limited, on purpose, to 50M which is great.

I'm willing to work (days & nights!!) to get it correct as long as know what to do.

Nobody so far told me about xkeycaps.dsl. I'll try to go to Google to understand how to get it and how it works. I agree everybody cannot be satisfied, that why I'm ready to configure my keyboard key by key if necessary!!

After your tests, if you have additional inputs or tricks to give me, I"ll be more than happy to share w/ you.

Thx for encouraging me anyway. I really want to use this package and ready to do everything for it (as long as I know what to do!!)

Have a nice day, keep in touch

Gerard

PS: it's not too clear for me so far where to get xkeycaps.dsl, but I'll search

Posted by spock on Jan. 09 2006,23:47
Hello Gérard,

< The DSL Documentation >

< Extensions for DSL (look in System for xkeycaps.dsl) >

< The XKeyCaps Homepage >

Also nobody answered your question about .xinitrc (if you want to try that solution). To see hidden files in a console type ls -a, in Emelfm on the H on top of the GUI.

Of course I would be happy if the developpers of DSL want to add more support for the French keyboard, but would you like to have the Russian keyboard on your live CD if for that you're losing something else which is more useful ? I conceive DSL more like a core system on which everyone can build his own...

Cheers  :)

Posted by winux on Jan. 10 2006,00:15
Wahoo Thierry, you're the only one now to give me some feedback, Thx a lot for answering the pending questions I had. I'll have to go through all the doc now, but I like it.

In my IT club, the Linux Gurus are not so enthusiastic to help me because they wait for the equivalent light version on the Ubuntu Dapper 6.04 coming in April and called Xubuntu. I don't want to wait so long to use my old PC!!!

Actually I did what you said regarding .xinitrc. Your answer was right but the result is the same. What I think is that there is no French (for France) keyboard. But if xkeycaps work, that will do.

Anyway I like this DSL package. I think if we can go thru, one developper wrote me he would be happy to include it (as far as I understood his pure English which is not my case!!). Well I think we can go ahead, and for the final result we'll see what can be done for us, otherwise, maybe we'll be able to include, ourselves what we found, in the regular version.

Actually it would not be stupid to have a "pure" French keyboard, as long as there is one for Italy, Germany, UK which means high population (Compared to Europe of course!!).

Well I'm gonna look at your "homework" and come back on line as soon as I have a result. If you go faster, do not hesitate to let us know. Maybe other French will be happy for that!!

Have a nice day Thierry, I'll have a short night!!! ???

Posted by winux on Jan. 10 2006,16:01
Hi spoke, Hi everyone

As I opened my own post regarding this important subject (at least for me!!), I encourage you to see the answers over there and not here, Especially the feed-back from Roberts who seems to be a big wheel in DSL project

I did a big step forward, but I don't know what to do w/ it!! :O

Actually, after reading a lot of docs (very well done in simple English, Thx 2u for having given me the links), I did:

myDSL > system, in order to install xkeycaps (on the HD, I don't work w/ the live CD anymore to simplify my life).

Then, from the map, I found MY keyboard (100% compatible)  and actually THE ONE of 60 millions of people (just kidding of course :p !!).

Here is the result I read on the title bar:

xkeycaps ; PC102 keys, wide delete, tall enter (xfree86 ; French) keyboard

But now, what can I do w/ this? can I tell the system that's the one I want?

I hope my old PC will be fully operational ... tonight!!

Thx for your support, have a nice day :laugh:

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.