Reverse detail from Kakelbont MS 1, a fifteenth-century French Psalter. This image is in the public domain. Daniel Paul O'Donnell

Forward to Navigation

Custom Keyboard in Linux/X11

Posted by (Last Modified: May 03, 2014 14:05)

Introduction

As an Anglo-Saxonist and philologist, I make daily use of a number of characters that are not found on the standard US computer keyboard. These include characters and accented letters from various European languages (e.g. ß, é, ä, ø), IPA symbols (e.g. ŋ, ә, etc.), Middle English ȝ, and various letters and forms used in Old English (æ, þ, ċ, ġ, ƿ, ū, ȳ, etc.).

It is possible to gain access to these letters from the character map utility (versions of this are found in all operating systems) or from the “Insert Special Characters” function in my word processor. But for characters I use all the time, this is quite tedious and time consuming. If I am typing Old English, I want to be able to access the “special characters” I use most often from the keyboard. Characters consisting of a single glyph (e.g. æ, ß, þ, ð), I want to be able to enter from the keyboard directly; accented characters (e.g. è, ü, ȳ), I want to be able to build (compose) from their component parts (e.g. type ` and e to get è1. I also want to be able to use these characters in all programs and utilities on my computer: in my email client, from the command line, in programs and utilities that do not have a “insert special characters” menu item.

Fortunately, it is quite easy in X-11 based Linux distributions to create both custom keyboard layouts (for typing individual characters) and custom compose sequences (for building characters from their component parts)2.

The following shows how I customised my keyboard and compose sequences in Ubuntu. Ubuntu (or perhaps Gnome?) changed things between Ubuntu 8.04 and 8.10, so you need to do things slightly differently depending on which version you are using. The same techniques should work in other X11-based distributions, although different distributions have the files in different places (see, for example, comment 8 below for Fedora 8).

This material is derived primarily from discussions at the following URLs:

In adding material on Ubuntu 8.10, I am indebted to the comments by jv and raek, below. Thanks very much.

Contents

Customising the keyboard layout

Customising the keyboard layout involves four or five steps that vary depending on your distribution:

  1. Creating a custom keyboard layout in X11/xkb/symbols/ (here’s my original and my latest).3
  2. Modifying the configuration files
    1. ≤ Ubuntu 8.04: X11/xkb/rules/xorg.xml (here’s mine) and (optionally) X11/xkb/rules/xorg.lst (here’s mine)
    2. ≥ Ubuntu 8.10: X11/xkb/rules/evdev.xml (here’s mine)
  3. Other cleanup and enabling
    1. ≤ Ubuntu 8.04 (not necessary in ≥ Ubuntu 8.10): Modifying the combination key bindings (i.e. the strokes that produced composed keys such as ȳ) X11/locale/en_US.UTF-8/Compose copied to /home/$USER/.XCompose and modified if necessary (here’s mine)
    2. Invoking the new evdev, either by sudo dpkg-reconfigure xkb-data or by deleting the xkm files in /var/lib/xkb and either logging out and back in or just switching to a new layout and back (see here for details)
  4. Designating “third level chooser” and “compose” keys in Gnome.

When you design your custom keyboard, you might want to keep some of the national, ISO, or SIL keyboards in mind: there’s no point learning an idiosyncratic keyboard layout if something already exists that covers what you want. For national and ISO standards, the Wikipedia article Keyboard Layout is a good place to start. For SIL, you can start at their resources page

Creating a custom keyboard layout

In X11 systems, keyboard layouts are kept in the X11/xkb/symbols directory (in Ubuntu, the full path is /etc/X11/xkb/symbols; the top level directory may be different in other distributions).

Each of the files in this directory contains a series of entries of the following type:

key <AC01> { [ a, A, aacute, Aacute ] };

This entry maps a key on the keyboard to a number of specific characters using the following conventions:

  1. The first two letters after key indicate where the key is found: The first letter indicates we are looking in the alphanumeric key block (other options include KP [for keypad] and FK [for Function Key]); the second indicates the row, counting from the bottom in which the key is found. (In a standard US keyboard, the space bar is in row AA and the number keys are in row AE).
  2. The next two numbers indicate the position of the key, counting from the left and ignoring any specially named key like <TAB> or <TLDE> (tilde): AC01 is in the third row up, first key over from the left (ignoring CapsLock, if present); on a standard US keyboard, this is the key marked “a”.
  3. The brace and square brackets enclose the list of characters assigned to each key. This can contain between one and four entries, separated by commas.
    1. The first entry is for the unmodified key (i.e. what happens when you press the key by itself)—in this case a.
    2. The second entry is for the shifted character (i.e. what happens when you press the key in question and <shift> at the same time)—in this case A.
    3. The third entry is for the “third level” character (accessed when you press the key with a “third level chooser” (see below)—in this case á.
    4. The fourth entry is for the shifted “third level” (i.e. when you press the key at the same time as <SHIFT> and the “third level chooser“—in this case Á.

Creating a custom keyboard map is as easy as replacing the characters you don’t want in a given line with the ones you do. As an Anglo-Saxonist, I type á and Á much less frequently than I type æ and Æ, for example. To add the Anglo-Saxon characters to my list, I simply replace aacute and Aacute with the entity names or Unicode code points for æ and Æ (“aelig” or U00E6 and “AElig” or U00C6, respectively):

key <AC01> { [ a, A, aelig, AElig ] };

or

key <AC01> { [ a, A, U00E6, U00C6 ] };

When I am finished modifying my keyboard layout, I save the file with a new name (in my case oe in the X11/xkb/symbols directory.

Adding a new keyboard layout to xorg.xml (≤ Ubuntu 8.04)/evdev.xml (≥ Ubuntu 8.10) and xorg.lst

In order to use my new keyboard layout, I need to tell X11 that it exists. X11 keeps track of installed keyboards in one of two configuration files: X11/xkb/rules/xorg.xml (Ubuntu 8.04 and lower) or X11/xkb/rules/evdev.xml (Ubuntu 8.10 and higher) (There is also a file /etc/X11/xkb/rules/xorg.lst that seems to contain similar information; it doesn’t seem to be used in any recent version of Ubuntu).

X11/xkb/rules/xorg.xml (≤ Ubuntu 8.04)

To add a keyboard layout to X11/xkb/rules/xorg.xml (i.e. for use in Ubuntu 8.04 and lower):

  1. Open X11/xkb/rules/xorg.xml in an editor
  2. Go to the end of the <layoutList> section (search for </layoutList>). Add the following after the last </layout> tag, where * is the file name of your keyboard layout in X11/xkb/symbols (in my case Old English); *y a suitable short name (in my case OE); and z an appropriate long name in one or more languages (in my case “Old English”):

       <layout>
         <configItem>
           <name> x </name>
           <shortDescription> y </shortDescription>
           <description> z </description>
         </configItem>
       </layout>
X11/xkb/rules/evdev.xml (≥ Ubuntu 8.10)

To add a keyboard layout to X11/xkb/rules/evdev.xml (i.e. for use in Ubuntu 8.10 and higher):

  1. Open X11/xkb/rules/evdev.xml in an editor
  2. Go to the end of the <layoutList> section (search for </layoutList>). Add the following after the last </layout> tag, where * is the file name of your keyboard layout in X11/xkb/symbols (in my case Old English); *y a suitable short name (in my case OE); * an appropriate long name in one or more languages (in my case “Old English”), and *aaa a legal three letter (ISO 639-2) language code (e.g. eng for English):

       <layout>
         <configItem>
           <name> x </name>
           <shortDescription> y </shortDescription>
           <description> z </description>
           <languageList>
              <iso639Id> aaa </iso639Id>
           </languageList>
         </configItem>
         <variantList/>
       </layout>
X11/xkb/rules/xorg.lst (optional)

For sake of consistency, you may want to edit X11/xkb/rules/xorg.lst to reflect the settings in X11/xkb/rules/xorg.xml (As far as I can tell, not doing so does not affect anything, but who knows?).

  1. Open X11/xkb/rules/xorg.lst in an editor.
  2. Find the section that begins ! layout
  3. At the end of this block add the file name your keyboard layout has in X11/xkb/symbols and a long-text description of your keyboard (in my case these are oe and Old English respectively).

Assign “Third-Level Chooser”

The final stage is to designate a “Third Level Chooser” key to allow you to access the characters you have just added to your keyboard. In Gnome-based systems like Ubuntu, this is probably best done from the menu bar:

  1. Open the Keyboard menu (System > Preferences > Keyboards)
  2. Select the “Layouts” tab
  3. Click the “Add” button
  4. Choose your custom layout from the alphabetical list of available layouts and click “OK”. If you want this working every time you log in, check the “default” option.
  5. Select the “Layout Options” tab
  6. Expand the “Third-Level Choosers” list entry
  7. Choose the key you want to use as a “Third Level Chooser”4
  8. Click on the “Close” button

You should be able to access your custom keys immediately. If you find that they are not working, reset X11 by logging out and back in. At that point they should work fine.

Customising compose key sequences.

Note: I am not sure is this section (except for assigning a compose key in Gnome) is necessary in Ubuntu 8.10+).

Gnome provides access to hundreds of compose key sequences by default, though getting a list of these sequences can be quite difficult.

While the default key bindings are almost certainly enough for typing most modern languages, you may discover one you need is missing, or wish to use a different set of keys. In such cases, you will need to add or modify the compose key sequences.

Apparently (http://ubuntuforums.org/showpost.php?p=1231373&postcount=2), this list of compose key bindings cannot be edited5. To get around this, you set the text input method to xim and create a custom list of compose key bindings. This sounds harder than it is:

Changing the input method to xim

  1. Open /etc/environment in an editor
  2. Add export GTK_IM_MODULE=xim to the end and save.

Creating a list of keybindings

  1. Copy the X11 compose-key bindings for your keyboard to your home directory (for US keyboards cp /usr/share/X11/locale/en_US.UTF-8/Compose ~/.XCompose; for other locales, see the options available in /usr/share/X11/locale/
  2. Open ~/.XCompose in an editor. The file consists of a series of lines that map character combinations to Unicode code points, e.g. <code><Multi_key> <macron> <U> : "Ū" U016A # LATIN CAPITAL LETTER U WITH MACRON
  3. Edit/Add key sequences (e.g. <Multi_key> <minus> <Y> : "ȳ" U0233 # LATIN SMALL LETTER Y WITH MACRON (Tip: this file contains a number of references to characters you probably don’t have set up in your keyboard, such as <macron> in key bindings for characters like ē. In my case, I changed all examples of <macron> to <minus>.
  4. Save file.

Assign “Compose key”

The final stage is to designate a “Compose Key” key. This is the key that indicates the next keys are part of a compose key sequence.

  1. Open the Keyboard menu (System > Preferences > Keyboards)
  2. Select the “Layout Options” tab
  3. Expand the “Compose Key” list entry
  4. Choose the key you want to use as a “Compose Key”
  5. Click on the “Close” button.

You will need to log out and back in before your settings take effect. After you have logged back in, you should be able to use your new compose key sequences.

Resetting the keyboard

I’ve had trouble with changes not taking effect. According to this forum entry, the only way of doing this is to eliminate the all the *.xkb files in /var/lib/xkb and then restart the windows manager (in post-Unity versions of Ubuntu sudo restart lightdm).

I did this by creating a new directory for the old files, then moving them to that directory, then restarting the manager.

It works.


Notes

1 I make this distinction because I don’t type accented characters enough to make it worth my while to treat accented characters as single glyphs. If I found myself typing characters like ü very often, I could easily add them to my keyboard in the same way I add characters like æ or ß.

2 Windows, pre-OS X Macs (and to a lesser extent Mac OS X) handle keyboard mapping differently. Utilities exist that either allow you to create custom keymaps or use keymaps that cover common specialisations (e.g. for linguists who need to type IPA. You can find more about these solutions by searching for terms like “keyboard” “custom” “keymaps” and “Windows” or “Mac”.

3 The top level directory for this path varies from distribution to distribution. In Ubuntu ≤ 8.10, the full path is /etc/X11/xkb/symbols/; in In Ubuntu ≥ 9.04 it is /usr/share/X11/xkb/symbols/. There are other changes in the contents of these files. You are better modifying the version on your system than downloading my copies of evdev, etc. The keyboard layout file itself should work fine if you download it. Just make sure you change the name to match the contents of the <name> element in evdev.xml.

4 For reasons that are not clear to me, some programs (most notably Evolution) fail to recognise “Third Level Choosers” if you deselect “Right Alt“—the safest way to go is to use right alt as your third level chooser or make two keys your third level chooser: right alt and some other key of your choosing.

5 Actually I doubt this is true, but the method I’m describing here works for me and proved easier than discovering how to do it within Gnome.

---

Posted: Saturday December 9, 2006. 14:15.

Last modified: Saturday May 3, 2014. 14:18.

----  

Comment [50]

  1. Mate (Mon Jan 29, 2007 (12:23:44)) [PermLink]:

    Thank you very much! I searched for a tutorial exactly like this! Mate from Hungary.

  2. Jan (Mon Apr 9, 2007 (16:23:51)) [PermLink]:

    Thanks for your tutorial. I’ve used it to define a new layout, but i’m having trouble using combined diacritics to accent all vowels. Do i define the character combinations somewhere else?

  3. Dan O'Donnell (Tue Apr 10, 2007 (12:40:07)) [PermLink]:

    Jan,

    I’m not sure exactly what the nature of your problem is:

    * do you mean that certain combinations of combining diacritics are not working?

    * Or that you want to add new combinations that don’t exist

    * Or that you want to add precomposed characters to your keyboard layout?

    * Or something else?

    The thing to keep in mind to start with is that composition and key assignments are different: if you want to get a composed character in one key stroke (with or without a second or third level chooser), you add it to a custom keyboard; if you want to be able to compose on the fly, you use a compose key (different from your third level chooser) and then two other keys—for the diacritic and for the letter it combines with.

    If the issue is that you don’t know how to combine certain diacritics with certain letters, all I know is written out above in the section “Customising compose key sequences.” I found it a more tedious question of ploughing through ~/.XCompose.

  4. neo (Fri May 18, 2007 (12:45:17)) [PermLink]:

    Anyone has done this successfully in Debian? I found out there is no xkb, etc. setting located in the X11 folders. What should I do in order to get it worked under Debian testing?

    Many thanks.

  5. dan (Fri May 18, 2007 (17:28:14)) [PermLink]:

    I’m assuming you mean pure debian rather than the Ubuntu fork/variant?

    I don’t know. I just checked and Ubuntu Feisty still has the directory under /etc/X11. I don’t have a spare computer available to install straight Debian and see what happens.

  6. Daniel (Mon Mar 17, 2008 (20:46:46)) [PermLink]:

    Been trying to make my own layout it’s got 6 levels (english, latin, greek)
    Plus its Dvorak. anything above 4 levels seams to be undocumented so I found the canadian layout which uses 6 levels (8 levels possible) email me at yellow_onion at orcon.net.nz if you want to perhaps update your tutorial and be the first to document it

  7. ivan (Thu Apr 17, 2008 (15:42:35)) [PermLink]:

    thanks, i needed some custom layout for Java programming, this is absolute winner tutorial
    :)))

  8. linuxbee (Thu May 8, 2008 (20:58:39)) [PermLink]:

    in Fedora 8, the path is given by:
    /usr/share/X11/xkb/

  9. Dan O'Donnell (Tue May 20, 2008 (09:33:20)) [PermLink]:

    I reported that “this method doesn’t seem to work in versions 7.10 or 8.04 from a clean install. Part of the problem seems to be that Ubuntu now has the X11 material in two places and uses different names for some of the files.”

    But I was wrong: the trouble was I changed the name of the file and it wasn’t loading properly. The method works just fine on new Ubuntu installs of 7.10 and 8.04.

  10. Josh (Fri May 30, 2008 (23:21:27)) [PermLink]:

    Spectacular! It took me a while to find, but worth every second!

    I Used it to change the <MENU> key to a <KPDL> “KP_Delete” key in Ubuntu 8.04

    At first I was a little confused how the layout file was tied to the xorg.xml file. I eventually got everything to work, then of course saw Note #4.

    Your xorg.xml file has “<name>Old English</name>” instead of “<name>oe</name>” as Note #4 implies.

  11. dan (Sun Jun 8, 2008 (16:44:00)) [PermLink]:

    Thanks very much: I’ve fixed the note.

  12. ABU SAUD (Thu Jun 19, 2008 (22:41:55)) [PermLink]:

    I have some problem in xml unicode entities….i con’t access some entities and utilities in linux os server pls…help me….mail me to yummy.abu@gmail.com

  13. dan (Mon Jun 23, 2008 (23:56:40)) [PermLink]:

    Sorry. I don’t know what you mean!

  14. Petr (Sat Aug 16, 2008 (07:22:40)) [PermLink]:

    I need to define diferent compose keys in diferent for diferent layouts. Could you help me? The same key combination should get č when the Czech is elected, but ĉ, when I am using the layout for Esperanto.

  15. dan (Sun Aug 17, 2008 (23:25:11)) [PermLink]:

    I believe this is possible from within the key layouts themselves, but I confess I don’t know how to do it. You could look through all the various files in the symbol directory looking for compose keys.

    But are you sure you want the same key strokes for these? I can see how it might be handy to keep the two accents separate so that you can use them in typing other languages in both keyboards… e.g. French and/or American Phonetic Alphabet.

  16. dan (Sun Aug 17, 2008 (23:31:23)) [PermLink]:

    A follow up: Have you thought of the first approach listed under Linux here: http://www.esperanto.net/veb/faq-14.html

  17. Elmer (Sat Sep 20, 2008 (20:04:03)) [PermLink]:

    Great information. I am trying to get tengwar (language developed by J.J.R. Tolkien for Lord of the Rings) working on my Ubuntu 8.04 and so far it is going ok. The problem with tengwar is even though fonts are available for the characters, it uses the US standard keyboard. You can activate the fonts (I do this by using gvim and then selecting one of the tengwar fonts I installed in ~/.fonts) and then gvim uses the US standard keys to select which font to display. There is really no keymap. I am going to develope a tengwar keymap that takes into account what the most common tengwar symbol usage frequency.

    This is the same concept as the Dvorak keyboard.

    anyhow thanks a lot for your article.

  18. tims (Thu Oct 30, 2008 (06:20:31)) [PermLink]:

    As a technical writer, I appreciate how clearly you have explained things. As a dabbler in West African scripts, this will be most useful. Thanks!

  19. jv (Thu Nov 20, 2008 (13:37:32)) [PermLink]:

    I just installed the latest Ubuntu version 8.10 (Intrepid) and have been trying to get these things working. I have found out that the X11 directory has moved to /usr/share/ and that the files evdev.xml and evdev.lst are the right ones to modify now. I still haven’t been able to make new independent layouts show up in Gnome, but only variants. That’s not a big problem, but if someone finds out a way, I would be happy to know about it.

  20. dan (Thu Nov 20, 2008 (22:22:05)) [PermLink]:

    Thank you very much. I’ve just installed a couple of 8.10 versions and haven’t been able to figure out where things are yet.

    You’ve seen that the symbols directory is under xkb, right? Presumably that’s where you drop the new layouts.

    I also see the old xorg.xml and xorg.lst in that directory. Are you sure changing them doesn't work as of old?

  21. jv (Mon Nov 24, 2008 (11:30:23)) [PermLink]:

    At least the first time I got something new to show up in the Gnome selector was when I added a variant in evdev.xml.

    It seems the selection is now based on country or language. I think they used to be just layouts before (but typically named after countries). I also got an independent layout file working by adding a with <span class="caps">ISO</span> country codes in evdev.xml. That way the layout still appears under the chosen country/countries. I’m happy with that, as the panel indicator is now showing my own , which is more descriptive than the country code.

  22. dan (Tue Nov 25, 2008 (09:43:33)) [PermLink]:

    You’re right. I wasn’t able to get anything working in xorg.xml (which is basically the same format as evdev.xml). But I’m not getting things right anyway.

    You wouldn’t want to post an example of how you got it to work with the ISO names, would you?

  23. jv (Tue Nov 25, 2008 (15:38:09)) [PermLink]:

    Oh, the xml elements were dropped from my post. Just search for countryList in evdev.xml for an example. There are some japanese, arabic and latin american layouts with countryLists. I added same kind of countryList with the iso3166Id of my home country and found the layout in the corresponding section of the Gnome selector.

  24. Owaqpzru (Sat Dec 13, 2008 (11:25:33)) [PermLink]:

    Thanks!,

  25. Nico de Berlin (Sun Feb 8, 2009 (13:17:36)) [PermLink]:

    Great ! i was always puzzled by all these configuration files. Very clear tutorial. ThX !

    Made for polish letters with a german QWERTZ keyboard.

  26. dan (Sun Feb 8, 2009 (18:04:45)) [PermLink]:

    Did you get it working in 8.10? I haven’t! What did you do?

  27. Tova (Thu Mar 12, 2009 (12:25:38)) [PermLink]:

    Thank you very much for this very clear tuto ! It allowed me to type these darned Old Norse names far more easily. Sincere thanks from all the Óláfs !

  28. raek (Thu Mar 12, 2009 (15:28:40)) [PermLink]:

    I managed to get my layout working in Ubuntu 8.10:
    1) Place the symbol file in /usr/share/X11/xkb/symbols/.
    2) Edit the /usr/share/X11/xkb/rules/evdev.xml file.
    3) Add your layout to the file as described in this page.
    4) After ‹/description›, add ‹languageList›‹iso639Id› language ‹/iso639Id›‹/languageList›, where language is an existing language code, for example “eng” – English or “art” – Artificial. If you choose a non-existing language id, or omit it all together, your layout won’t appear in the Gnome selector.

    (NOTE: i used angle quotes instead of angle brackets in the XML tags in this post due to technical restrictions, so don’t copypaste these characters into your configuration file.)

    Thanks for the great tutorial, Dan!

  29. Daniel (Fri Mar 13, 2009 (05:59:06)) [PermLink]:

    Cannot find the files mentioned on Ubuntu 8.10 :(

  30. dan (Fri Mar 13, 2009 (19:00:50)) [PermLink]:

    Raek… this worked like a charm for me. Thanks very much. I’ve been missing my custom keys since last October!

  31. dan (Fri Mar 13, 2009 (19:08:45)) [PermLink]:

    Daniel: all the files (including those mentioned in Raek’s post) are found on my clean Ubuntu 8.10 install. How are you looking for them? From the command line? In Nautilus? Could it be in this later case that you need to work as root/sudo?

  32. oeb (Mon Mar 16, 2009 (12:10:13)) [PermLink]:

    how would one change the third level chooser to the [space-bar] for implementing a one-hand qwerty setup as in:

    http://eklhad.net/linux/app/halfqwerty.xkb ?

    the space-bar isn’t a choice in ‘layout options’. I’m using hardy-lts, which uses the X11-xkb-utils and not xkbcomp.

  33. dan (Mon Mar 16, 2009 (21:05:23)) [PermLink]:

    Perhaps something in /home/$USER/.XCompose?

    I’ve not had much luck overriding gnome, though.

  34. Nazar (Wed Mar 18, 2009 (09:40:05)) [PermLink]:

    Thanx, great tutorial.

    All i could add is the link to language ids referred by reak :
    http://www.loc.gov/standards/iso639-2/php/English_list.php

  35. dan (Wed Mar 18, 2009 (10:14:00)) [PermLink]:

    I’ve now updated the instructions to cover &#x2265;Ubuntu 8.10.

  36. John (Fri Mar 20, 2009 (19:55:10)) [PermLink]:

    Thanks for the tutorial.
    My files were in /usr/share/X11.

  37. ThierryM (Fri May 8, 2009 (07:18:37)) [PermLink]:

    Thank you very much for this tutorial. Under Ubuntu Jaunty 9.04, I had to modify the file /etc/X11/xkb/base.xml . I described how I made here in french : http://forum.ubuntu-fr.org/viewtopic.php?pid=2627927#p2627927.

  38. BulatY (Sun May 31, 2009 (11:54:45)) [PermLink]:

    Thank you very much. This tutorial make possible to define bashkir layout (russian ciryllic with some original characters) in Linux.

  39. Nico der Berliner (Tue Sep 22, 2009 (04:29:24)) [PermLink]:

    Thanks a lot for this very clear tutorial. I could finally create a Variant with polish letters to my german QWERTZ keyboard.

  40. Luzi (Tue Nov 24, 2009 (01:38:57)) [PermLink]:

    With the help of your instructions, I managed to design my own keyboard layout for Old Germanic
    So: [‘θæŋks]!

  41. Mariusz (Wed Nov 25, 2009 (14:14:05)) [PermLink]:

    An excellent and a very much needed tutorial.

    Do you know how to add a new keymap without root privilages?

    If you know or find out, would you be so kind to post the instructions? That would be doubly useful as many of us use Linux workstations at various scholarly institutions around the world as ordinary users who cannot modify any of the system files.

  42. dan (Fri Nov 27, 2009 (15:25:24)) [PermLink]:

    I don’t know that, but you’re right that it would be good to know. I’ll keep an eye out to see how one can override system wide settings in one’s own account. It is presumably possible.

  43. hajder (Sun Feb 28, 2010 (12:39:53)) [PermLink]:

    Mariusz:
    temporarily you can set it by typing “setxkbmap “
    or xmodmap

  44. poacheR (Fri Feb 18, 2011 (14:47:54)) [PermLink]:

    I’m trying to enable putting acute accents on russian (cyrillic) characters. I’ve had problems with the compose key that I won’t go into, so I’m trying to avoid that for now. I’ve had luck with editing the /usr/share/X11/xkb/symbols/ru file, and replacing the semicolon with U0301 (i.e.a non-spacing acute accent).

    For some reason, I always have to reload the keyboard after a login, before the accent gets activated, but it works. Now I can accent russian letters by pressing the key and then the semicolon key: о́чень хорошо́!

    What I was wondering is if there is a way to input composed unicode characters directly. Xkb throws an error if I try to insert a composed character, e.g. U0061 U0301 instead of, say, U00E1. Is it a matter of a syntax error on my part? Or can you not compose characters directly like that in the config file?

    (what I’m after would be to press the third-level key and the cyrillic vowel, and result in an accented cyrillic vowel)

    Спаси́бо, Dan!

  45. stan (Thu May 12, 2011 (18:31:14)) [PermLink]:

    poacheR – As far as I know, what you want to do is impossible. However, you should be able to put in the single equivalent unicode character in your keymap.

    I just stopped to thank Dan for posting these instructions. They still work on Fedora 14. It is possible to use them for either a variant (rules/evdev.xml and symbols/us) or a standalone keymap (rules/evdev.xml and symbols/my_keyfile). During development,I had some errors in my keymap, and the X error messages in the popup weren’t helpful. I ended up booting to runlevel 3, console only, and testing with startx. As a normal user, running the command startx > startx_output 2>&1 . When I logged out of X, I was able to see the error messages saved in the file and fix the problem. Maybe this will help someone else.

  46. JTSchrock (Fri May 20, 2011 (18:53:36)) [PermLink]:

    Hello,

    Thanks so much for this tutorial. It has been the one tool I’ve found useful so far for creating custom keyboards in Ubuntu.

    However, I am still having some difficulties. I’ve followed the steps you outline above, up to the third level chooser and Xcompose sections. (the keyboard I am making doesn’t have need for more than two levels). I also added:

    cj Chinook Jargon

    to the !layout section of xorg.lst and xorg.xml.

    After I add my layout file to ..X11/xkb/symbols and change the evdev.xml file I get the following error window:

    Error activating XKB configuration.
    It can happen under various circumstances: • a bug in libxklavier library • a bug in X server (xkbcomp, xmodmap utilities) • X server with incompatible libxkbfile implementation

    X server version data:
    The X.Org Foundation
    11001000

    If you report this situation as a bug, please include: • The result of xprop -root | grep XKB • The result of gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd

    I am using Ubuntu 11.04. After I’ve added the cj layout file and listed it in evdev.xml, I go to set my keyboard preference “Chinook Jargon” (that’s my target language). Remarkably, Chinook Jargon does show up as a permissible language, and even when I choose is in the “choose layout” window, the proper layout is displayed on the keyboard graphic. Once I click “add” the error message pops up. This makes me think there are additional steps that I must take to satisfy all of xkb’s requirements.

    I tried a workaround to test my layout file. I sudo’ed into ../xkb/symbols/bgr. Opened bgr in gedit, erased the first alphanumeric section, and pasted in the text from my cj layout file. Loaded Bulgarian as a keyboard in the preferences section, and away I typed in Jargon. This confirms that I’m missing a step or two in registering everything correctly within the xkb system.

    Would an absent third-level chooser cause this glitch? Xcompose?

    Thanks for any thoughts

    hayu masi pus munk-tʼsəm ukuk ɬush tʼwax̣-iliʔi!

  47. Sagar Behere (Wed May 25, 2011 (05:40:48)) [PermLink]:

    Thanks! This is exactly what I was looking for :)

  48. dan (Mon Jun 6, 2011 (18:36:10)) [PermLink]:

    First of all, JT, we should meet up: we must be very close to each other and I’m extremely interested in Chinook Jargon.

    As to the rest of your questions, I’ll need to check. Hopefully tomorrow.

  49. raek (Sat Jun 18, 2011 (04:30:00)) [PermLink]:

    Hello again!

    I thought I’d share a link to the Ubuntu Community Documentation that I just found:

    Howto: Custom keyboard layout definitions

    It seems to be similar to this page, but not as detailed. It does however point to the files you should edit in recent versions of Ubuntu and has some good links.

    Again, thanks for a great tutorial!

  50. Jaaf (Sat Aug 6, 2011 (08:07:17)) [PermLink]:

    Thanks for this very clear tutorial.
    I attempted to do as you say under Ubuntu 11.04 (Gnome). I took your file oe and put it in /usr/share/X11/xkb/symbols and modified evdev.xml and evdev.lst as you say.
    I did nothing else (no compose ans no third level chooser). Unfortunately after log out and back in again. I can’t find Old English in System > Preferences > keyboard.
    Any suggestion would be welcome.
    Thanks.

:
:

Textile Help

Back to content

Search my site

Sections

Quick links for students

Tags

anglo-saxon studies, computers, digital humanities, digital pedagogy, editorial studies, english 2810, exercises, grammar, history, linguistics, medieval studies, moodle, morphology, old english, pedagogy, students, study tips, testing, tips, tutorials, universities, yii

See all...

Follow me on Twitter

Recent changes to this site

At the dpod blog