Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Dec 2013 03:04:36 +0100
From:      Polytropon <freebsd@edvax.de>
To:        James Griffin <jmzgriffin@gmail.com>
Cc:        Isma Tim <ismatim@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: Remapkey spanish keyboard
Message-ID:  <20131229030436.194c6e4e.freebsd@edvax.de>
In-Reply-To: <52BEF53E.7060609@gmail.com>
References:  <CAMSA9wcJVFs57N0Mu=k2COZO=K3X=KsDUgcxsTmP9632kdf9AA@mail.gmail.com> <20131228164937.00000273.emorrasg@yahoo.es> <52BEF53E.7060609@gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sat, 28 Dec 2013 15:58:54 +0000, James Griffin wrote:
> You could try setxkbmap in your .xinitrc or .xsession ?

Of if you're running X without HAL, you can use the common
method of how things have been configured in X at a central
place: via /etc/X11/xorg.conf:

Section "InputDevice"
	Identifier	"Keyboard0"
	Driver		"kbd"
	Option		"XkbModel"		"pc105"
	Option		"XkbLayout"		"es"
	Option		"XkbOptions"		"terminate:ctrl_alt_bksp"
EndSection

The model "es" should be a spanish keyboard with all the
required special characters (such as n with tilde) generated
by the respective keys in their proper places.



For the text mode console, put the required setting in /etc/rc.conf:

	keymap="spanish.iso"
	keyrate="fast"
	font8x14="iso-8x14"
	font8x16="iso-8x16"
	font8x8="iso-8x8"

Also load the ISO fonts so you can _see_ the characters
correctly. :-)

There are three versions for the spanish language located at
/usr/share/syscons/keymaps/, those are:

	spanish.iso.acc.kbd
	spanish.iso.kbd
	spanish.iso15.acc.kbd

You will have to test which one fits your needs (omit the .kbd
for the rc.conf setting).

Note that you _might_ adjust settings for the shell you're using.
Here's an example for the C shell (from my modified system-wide
version of /etc/csh.cshrc), and again, remember that you will
probably have to decide which configuration fits your needs:

# "old-fashioned" version:
setenv	LC_ALL		en_US.ISO8859-1
setenv	LC_MESSAGES	en_US.ISO8859-1
setenv	LC_COLLATE	es_ES.ISO8859-1
setenv	LC_CTYPE	es_ES.ISO8859-1
setenv	LC_MONETARY	es_ES.ISO8859-1
setenv	LC_NUMERIC	es_ES.ISO8859-1
setenv	LC_TIME		es_ES.ISO8859-1
unsetenv LANG

# with "Euro" sign, also switches program messages language
setenv	LC_ALL		es_ES.ISO8859-15
setenv	LC_COLLATE	es_ES.ISO8859-15
setenv	LC_CTYPE	es_ES.ISO8859-15
setenv	LC_MESSAGES	es_ES.ISO8859-15
setenv	LC_MONETARY	es_ES.ISO8859-15
setenv	LC_NUMERIC	es_ES.ISO8859-15
setenv	LC_TIME		es_ES.ISO8859-15

# use with UTF-8
setenv	LC_ALL		en_US.UTF-8
setenv	LC_MESSAGES	en_US.UTF-8
setenv	LC_COLLATE	es_ES.UTF-8
setenv	LC_CTYPE	es_ES.UTF-8
setenv	LC_MONETARY	es_ES.UTF-8
setenv	LC_NUMERIC	es_ES.UTF-8
setenv	LC_TIME		es_ES.UTF-8
setenv	LANG		es_ES.UTF-8

Note that the text mode console can hardly handle UTF-8, so this
kind of setting is more a "X preparation".



Summary: You should not have to manually set up your keyboard
layout. That has been done decades ago. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20131229030436.194c6e4e.freebsd>