! adding non-English characters to X11 keymap ! Based on one by Luis F. Guzman ! http://www.cinlug.org/education/spanish_key_mini_HOWTO ! and a mailing list post Google that turned up, but I ! failed to record in time ! clear mod1 clear mod2 clear mod3 ! ! How to use/load this map: ! In my ~/.bash_profile I have the following: ! ! if [ ! -z "${DISPLAY:-}" -a -f $HOME/.xmodmaprc ]; then ! xmodmap $HOME/.xmodmaprc ! fi ! ! so the map is loaded when I log in. ! ! How this works, in brief: ! Normal keys/easy international characters ! keycode 54 = c C ccedilla Ccedilla ! means the "c" key produces "c" if pressed alone, "C" if pressed with ! the Shift key or when Caps Lock is on, "ç" if pressed with RightAlt, ! and "Ç" if pressed with RightAlt and Shift (or with RightAlt when the ! CapsLock is on) ! ! "Dead" keys/more involved combinations ! keycode 0x30 = apostrophe quotedbl dead_acute dead_diaeresis ! To get the character "ú" you can use the sequence (RightAlt + ') ! followed by "u". To get "ü" you can use the sequence (RightAlt + ") ! followed by "u" (which is to say Shift + RightAlt + ' followed by u). ! ! My default setup is that Spanish charcters use the easy shortcuts, ! and I have to use "dead" keys for things like German and Swedish. ! I have included commented-out lines for other languages in case you ! would prefer to have their characters more readily available (just ! comment out the Spanish rule and uncomment the German rule for any ! keys like "e" where you prefer "ë" to "é") ! ! español ! n - N - ñ - Ñ keycode 57 = n N ntilde Ntilde ! e - E - é - É keycode 26 = e E eacute Eacute ! u - U - ú - Ú keycode 30 = u U uacute Uacute ! o - O - ó - Ó keycode 32 = o O oacute Oacute ! a - A - á - Á keycode 38 = a A aacute Aacute ! i - I - í - Í keycode 31 = i I iacute Iacute ! - - ? - ¿ keycode 61 = slash question questiondown ! 1 - ! - ¡ keycode 10 = 1 exclam exclamdown ! ! Français ! c - C - ç - Ç keycode 54 = c C ccedilla Ccedilla ! ! Deutsch ! s - S - ß - ß keycode 39 = s S ssharp ssharp ! e - E - ë - Ë !keycode 26 = e E ediaeresis Ediaeresis ! u - U - ü - Ü !keycode 30 = u U udiaeresis Udiaeresis ! o - O - ö - Ö !keycode 32 = o O odiaeresis Odiaeresis ! a - A - ä - Ä !keycode 38 = a A adiaeresis Adiaeresis ! ! Scandinavian ! a - A - å - Å !keycode 38 = a A aring Aring ! e - E - æ - Æ !keycode 26 = e E ae AE ! o - O - ø - Ø !keycode 32 = o O oslash Ooblique ! ! ! general dead keys, for two-keystroke character composition ! ! ' - " - dead_acute - dead_diaeresis ! dead_acute + a = á ; dead_diaeresis + a = ä keycode 0x30 = apostrophe quotedbl dead_acute dead_diaeresis ! ` - ~ - dead_grave - dead_tilde ! dead_grave + a = à ; dead_tilde + n = ñ keycode 0x31 = grave asciitilde dead_grave dead_tilde ! 6 - ^ - dead_circumflex ! dead_circumflex + i = î keycode 0x0f = 6 asciicircum dead_circumflex ! , - < - dead_cedilla ! dead_cedilla + c = ç keycode 0x3b = comma less dead_cedilla ! ! Ugh. The dead_abovering seems broken. You may need to use ! the Scandinavian rules for things like aring ("å") ! 0 - ) - dead_abovering ! dead_abovering + a = å keycode 0x13 = 0 parenright dead_abovering ! ! make right-alt access the third & fourth otions keycode 113 = Mode_switch add mod1 = Alt_L add mod3 = Mode_switch !