Red Antigua Logo
Yet another piece of web.
Search this site (by Google)
Tools    (top)
Check a site for broken links
(W3C)

Perl modules    (top)
Tree::Numbered::Tools
(CPAN)
Perl tutorials    (top)
Perl modules
HTML::Template
CGI::Application
Cookies with CGI::Application
Upload files with CGI::Application
Download files with CGI::Application
Redirect with CGI::Application
CPAN shell
Install DBD::mysql from the CPAN shell
Perl trim function
Validate an IP with Perl
Run suid Perl scripts under Apache
Perl taint mode
Perl date functions with Date::Calc

In Spanish
Curso de Perl

C tutorials    (top)
C - Introduction
C - Absolute beginner's Emacs
C - Examples for beginners
C - Makefile examples
C - Autotools examples
Server configurations    (top)
DNS
Apache
Apache Authentication and Access Control
mod_perl on FreeBSD
MySQL
MySQL add account
phpMyAdmin
Squid
DHCP

UNIX on Windows    (top)
MSYS2 - UNIX environment for MS Windows 32/64 bits
Apache setup on Windows
MySQL setup on Windows
PHP setup on Windows
Perl setup on Windows
Emacs setup on Windows
PuTTY
WinSCP
GIMP on Windows
MinGW - gcc on Windows
MSYS - UNIX-styled shell on Windows
msysDTK - autotools on Windows
GDB for MinGW on Windows

Misc. FreeBSD/UNIX    (top)
'portupgrade' on FreeBSD
'ipf' on FreeBSD
'pf' on FreeBSD
'su' on FreeBSD
Mount an ISO image under FreeBSD
Load the correct sound driver under FreeBSD without knowing what sound card you are using
Simultaneous sound channels on FreeBSD
FreeBSD network stuff
DOS-to-UNIX file conversion
favicon.ico on UNIX
Emacs tips
Command Line Calculator
Save multimedia streams with 'mplayer'
xargs - solution to 'Argument list too long'
Process multiple images from the command line using 'ImageMagick'
Turn the system bell off under X Windows
Process each line in an input file from the command line (or in a shell script)
How to keep a program running in the background using 'nohup'
How to remove symbolic links in the current directory using 'find' and 'rm'
How to remove Emacs backup files in the current directory and all subdirectories using 'find' and 'rm'
How to execute .profile without logging in
Configure X to handle non-English characters
How to move /var to /usr/var

Redirect a web page    (top)
Redirect to another web page
Apache redirect
C redirect
Perl redirect
PHP redirect
HTML redirect
JavaScript redirect

Javascript    (top)
Trim function
Login form
Register form
Popup window

Configure X to handle non-English characters on a US keyboard.
Configure X to handle non-English characters on a US keyboard
How do you type these characters on a US keyboard?
ÁÉÍÑÓÚáéíóñú¡¿ (Spanish)
ÅÄÖåäö         (Swedish)
ÅÆØåæø         (Danish)
ᚁ            (German)
Çç             (Portuguese)
€¥             (Currency)
©®             (Copyright, etc.) Sorry, there is no copyleft - yet. ;-)
²³¼½¾          (Various characters)
At the time of this writing (2009-09-21), X keyboard configuration is moving away from xorg.conf, and is now handled by HAL/DBUS.
Anyway, if you aren't using HAL/DBUS, here is an example of xorg.conf's InputDevice section:
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbLayout"    "us"
        Option      "XkbVariant"   "intl"
EndSection
If you are using HAL/DBUS, the parameters above should be commented out:
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
###     Option      "XkbLayout"    "us"
###     Option      "XkbVariant"   "intl"
EndSection
Both Gnome and KDE have GUIs and configurable shortcuts for multiple keyboard layouts.
Anyway, you can set a keyboard layout manually with the setxkbmap command:
setxkbmap -layout us -variant intl    # AltGr and Dead keys
setxkbmap -layout us                  # No international keys
Here is a simple script that toggles between the 'us' and 'us intl' keyboard layouts:
(Note that this script is completely innecessary if you are using a relatively recent version of GNOME or KDE.)
#!/bin/sh
# Script to toggle between 'us' (no dead keys) and 'us intl' (dead keys and AltGr+key)

# setxkbmap -print|grep xkb_symbols
# gives either:
#        xkb_symbols   { include "pc+us(intl)+inet(pc105)"       };
#or:
#        xkb_symbols   { include "pc+us+inet(pc105)"     };

setxkbmap -print|grep xkb_symbols | grep intl > /dev/null 2>&1
if [ $? -eq 0 ];then
    # 'us intl' (dead keys) was set, toggle to 'us' (no dead keys).
    setxkbmap -layout us
else
    # 'us' (no dead keys) was set, toggle to 'us intl' (dead keys).
    setxkbmap -layout us -variant intl
fi
Play around with the AltGR key (to the right of the SPACE tab) to find the keys you need to use.
To use the Dead Keys, type for example a " (double quote, displays nothing), followed by an o, which then will display an ö.

Last modified: Mon Sep 21 17:08:21 CEST 2009