HOWTO Configure Windows Keys to Type Spanish Chars

LINUX HOWTO
Configure the MS-Windows Keys to Type Spanish Characters

Luis F. Guzmán
luis.guzman@att.net
Central Indiana Linux Users Group
www.cinlug.org


ABSTRACT

This document contains a detailed procedure on how to configure the MS-Windows keys in the Linux Operating System to type Spanish characters normally missing on English keyboards. These characters are , , ´, ¨, , and .


INTRODUCTION

This document contains a detailed procedure on how to configure the MS-Windows keys in the Linux Operating System to type Spanish characters normally missing on English keyboards. This is a noble use for these keys, which are not used with Linux. Another option would be to reconfigure your keyboard into a Spanish keyboard, but the disadvantage to this alternative is that many of your keys will type characters different from what is displayed on them since Spanish keyboards have many of the keys at locations different from English keyboards. By using this procedure, you will still have WYSIWYT (What You See Is What You Type), except for the MS-Windows keys, of course.

The table below shows how these keys will be configured.

Key Character Character Name
Left_Window Inverted Question Mark
Shift-Left_Window Inverted Exclamation Mark
Right_Window ´ Acute Accent*
Shift-Right_Window ¨ Diaeresis*
Right_Menu Lowercase Ee
Shift-Right_Menu Uppercase Ee

* The acute accent and the diaeresis are meant to be placed on top of a vowel, so a vowel key has to be depressed after depressing the Right_Window or the Shift-Right_Window keys. No character will appear until this sequence has been completed.


RECONFIGURING THE KEYS

Step 1:

Using a text editor, create a file named .xmodmaprc in your home directory. The file should contain the following text:


    ! Adding six Spanish character to my keyboard.
    ! By Luis F. Guzman (Sept 19, 1998)

    ! left window key
    keycode 115 = questiondown exclamdown
    ! right window key
    keycode 116 = dead_acute dead_diaeresis
    ! right menu key
    keycode 117 = ntilde Ntilde


Step 2:

From a shell prompt, and while being on your home directory, run the following command:


    $ xmodmap .xmodmaprc

After running xmodmap, the keys should have the new configuration.


Step 3:

Start an application that supports the Spanish characters, Netscape's e-mail editor supports them, and test the newly configured keys. If the keys don't work, refer to the troubleshooting section later in this document.


MAKING THE KEY CONFIGURATION PERMANENT IN GNOME

To make the key configuration permanent, your X session manager has to be configured to run the xmodmap command above every time your X session is initialized. Therefore, this procedure varies depending on the window manager you are using. The procedure in this document is for GNOME running Enlightenment.

Step 1:

Click on The GNOME configuration tool button, which is located on the panel on the bottom of the screen. The GNOME Control Center will start.


Step 2:

Left click on Session Manager.


Step 3:

On the Non-session-managed Startup Programs, click on Add... The Add Startup Program dialog box will appear.


Step 4:

On the Startup Command, type:


    /usr/X11R6/bin/xmodmap /home/your_home/.xmodmaprc

The line above assumes that /usr/X11R6/bin/ is the directory where xmodmap program is located and that /home/your_home/ is your home directory, so these paths may need to be replaced by the appropriate paths in your computer.


Step 5:

click OK to go back to the Control Center dialog window.


Step 6:

Click OK on the Control Center dialog window.


Step 7:

From the menu bar, select \z_File; then, E\z_xit.


Step 8:

Log out of your x-session, and log back in.


Step 9:

Start Netscape's mail editor (or any other application that supports the configured characters), and test that the keys work.


MAKING THE KEY CONFIGURATION PERMANENT IN OTHER SESSION MANAGERS

Feel free to e-mail me procedures for other session managers so that I can add them to this HOWTO. My e-mail address is: luis.guzman@att.net.


TROUBLESHOOTING

Use xev to ensure that the key-codes being configured (115, 116, and 117) are the ones being produced by the MS-Windows keys. If they are not, modify your .xmodmaprc file accordingly.


SEE ALSO

xmodmap(1), X(1), xev(1), Xlib documentation on key and pointer events


BUGS

Not all applications support these characters. The good news are that more and more applications are adding support for them. I was glad to discover that newer versions of vi do.

Go to Author's home page

This document is maintained by: Luis F. Guzmán
Mar. 24, 2004 4:35 pm US/Eastern