Skip to content

Example Keyboards

marksvc edited this page Jun 16, 2021 · 1 revision

Note: This page contains old documentation from 2011, but may still be of use.

Table of Contents

Cameroon QWERTY Keyboard

Contents of file: /usr/share/X11/xkb/symbols/cm

The First section of this file (called qwerty) defines the keyboard layout itself. The module level3(ralt_switch) is imported to make it possible to access special characters using the AltGr (right alt key). The second section (called semicolon_switch) defines the ; key as a dead key that allows access to the special characters.

To access special characters, you have 3 options, you can:

  • Lower Case (Bottom Row, Second Column)
    • Type semicolon, then press the key.
    • Hold AltGr (Right Alternate) and press a letter.
    • Hold Left Ctrl and Alt, then press the letter.
  • Upper Case (Top Row, Second Column)
    • Type semicolon, then hold Shift and press the key.
    • Hold AltGr (Right Alternate) and Shift and press a letter.
    • Hold Left Ctrl and Alt and Shift then press the letter.
The comments, though not neccesary, are useful documentation delimited by "//".
 partial modifier_keys
 xkb_symbols "semicolon_switch" {
 	key <AC10> {
 	symbols[Group1] = [ ISO_Level3_Latch,	colon,	semicolon,	colon ]};
 	modifier_map Mod5	{ ISO_Level3_Latch };
 };

Addition to /usr/share/X11/xkb/rules/evdev.xml

This is an example of a single layout for a country. For countries that have multiple layouts, you must add variants instead of layouts, so browse evdev.xml for examples.

 <layout>
      <configItem>
        <name>cm</name>
        <shortDescription>cam</shortdescription>
        <description>Cameroon Qwerty</description>
        <languageList>
              <iso639Id>eng</iso639id>
              <iso639Id>bas</iso639id>
              <iso639Id>nmg</iso639id>
              <iso639Id>fub</iso639id>
              <iso639Id>ewo</iso639id>
              <iso639Id>xmd</iso639id>
              <iso639Id>mfh</iso639id>
              <iso639Id>bkm</iso639id>
              <iso639Id>ozm</iso639id>
              <iso639Id>lns</iso639id>
              <iso639Id>sox</iso639id>
              <iso639Id>pny</iso639id>
              <iso639Id>wes</iso639id>
              <iso639Id>lem</iso639id>
              <iso639Id>nyj</iso639id>
              <iso639Id>mfk</iso639id>
              <iso639Id>mcp</iso639id>
              <iso639Id>ass</iso639id>
              <iso639Id>xed</iso639id>
              <iso639Id>dua</iso639id>
              <iso639Id>anv</iso639id>
              <iso639Id>bum</iso639id>
              <iso639Id>btb</iso639id>
              <iso639Id>bfd</iso639id>
              <iso639Id>azo</iso639id>
              <iso639Id>ken</iso639id>
              <iso639Id>yam</iso639id>
              <iso639Id>yat</iso639id>
              <iso639Id>yas</iso639id>
            </languagelist>
      </configitem>
    </layout>

Cameroon AZERTY Keyboard

Basically the same use as the Cameroon Qwerty, but uses the exclamation key rather than semicolon and is set up for a French Keyboard.

Addition to /usr/share/X11/xkb/symbols/cm

 partial alphanumeric_keys
 xkb_symbols "azerty"
 {
 	name[Group1] = "Cameroon Francophone";
 	include "level3(ralt_switch)"
 	key <AB01> { [ w, W, U1E85, U1E84 ] };	//  SMALL LETTER W,  CAPITAL LETTER W, SMALL LETTER W WITH DIAERESIS, CAPITAL LETTER W WITH DIAERESIS
 	key <AB02> { [ x, X, U2039, U203A ] };	// SMALL LETTER X, CAPITAL LETTER X, SINGLE LEFT-POINTING ANGLE QUOTATION MARK, SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
 	key <AB03> { [ c, C, U0327, copyright ] };	// SMALL LETTER C, CAPITAL LETTER C, COMBINING CEDILLA, COPYRIGHT SIGN
 	key <AB04> { [ v, V, UA78C, UA78B ] };	// SMALL LETTER V, CAPITAL LETTER V, SMALL LETTER GLOTTAL (SALTILLO), CAPITAL LETTER GLOTTAL (SALTILLO)
 	key <AB05> { [ b, B, U0253, U0181 ] };	// SMALL LETTER B, CAPITAL LETTER B, SMALL LETTER B WITH HOOK, CAPITAL LETTER B WITH HOOK
 	key <AB06> { [ n, N, U014B, U014A ] };	// SMALL LETTER N, CAPITAL LETTER N, SMALL LETTER ENG, CAPITAL LETTER ENG
 	key <AB07> { [ U002C, U003F, NoSymbol, U00D7 ] };	// COMMA, QUESTION MARK, , MULTIPLY
 	key <AB08> { [ semicolon, period, dead_acute, dead_grave ] };	// SEMICOLON, PERIOD
 	key <AB09> { [ colon, slash, U0323 ] };	// COLON, SLASH, COMBINING DOT BELOW
 	key <AB10> { [ exclam, U00A7 ] };	// EXCLAMATION MARK, SECTION SIGN
 	key <AC01> { [ q, Q, U2014, U2013 ] };	// SMALL LETTER Q, CAPITAL LETTER Q, EM DASH, EN DASH
 	key <AC02> { [ s, S, U201C, U201D ] };	// SMALL LETTER S, CAPITAL LETTER S, LEFT DOUBLE QUOTES, RIGHT DOUBLE QUOTES 
 	key <AC03> { [ d, D, U0257, U018A ] };	// SMALL LETTER D, CAPITAL LETTER D, SMALL LETTER D WITH HOOK, CAPITAL LETTER D WITH HOOK
 	key <AC04> { [ f, F, U00E6, U00C6 ] };	// SMALL LETTER F, CAPITAL LETTER F, SMALL LIGATURE AE, CAPITAL LIGATURE AE
 	key <AC05> { [ g, G, U02BC, UA78B ] };	// SMALL LETTER G, CAPITAL LETTER G, CURVED GLOTTAL, CAPITAL LETTER GLOTTAL (SALTILLO)
 	key <AC06> { [ h, H, U03B1, U2C6D ] };	// SMALL LETTER H, CAPITAL LETTER H, SMALL LETTER ALPHA, CAPITAL LETTER ALPHA
 	key <AC07> { [ j, J, leftarrow, U2122 ] };	//SMALL LETTER J, CAPITAL LETTER J, LEFT ARROW, TRADE MARK SIGN
 	key <AC08> { [ k, K, downarrow, uparrow ] };	// SMALL LETTER K, CAPITAL LETTER K, DOWN ARROW, UP ARROW
 	key <AC09> { [ l, L, rightarrow, U00A3 ] };	// SMALL LETTER L, CAPITAL LETTER L, RIGHT ARROW, POUND STERLING
 	key <AC10> { [ m, M, U00F9, U00B5 ] };	// SMALL LETTER M, CAPITAL LETTER M, SMALL LETTER U WITH GRAVE, MICRO SYMBOL
 	key <AC11> { [ U0300, U0302, U1DC5, U1DC4 ] };	// COMBINING LOW TONE, COMBINING FALLING TONE, COMBINING LOW-MID TONE, COMBINING MID-HIGH TONE
 	key <AD01> { [ a, A, U025B, U0190 ] };	// SMALL LETTER A, CAPITAL LETTER A, SMALL LETTER OPEN E, CAPITAL LETTER OPEN E
 	key <AD02> { [ z, Z, U2026, U2020 ] };	// SMALL LETTER Z, CAPITAL LETTER Z, ELLIPSIS, DAGGER
 	key <AD03> { [ e, E, U0259, U018F ] };	// SMALL LETTER E, CAPITAL LETTER E, SMALL LETTER SCHWA, CAPITAL LETTER SCHWA
 	key <AD04> { [ r, R, U25CC, U00AE ] };	// SMALL LETTER R, CAPITAL LETTER R, PLACEHOLDER SYMBOL, REGISTERED SIGN
 	key <AD05> { [ t, T, U0153, U0152 ] };	// SMALL LETTER T, CAPITAL LETTER T, SMALL LIGATURE OE, CAPITAL LIGATURE OE
 	key <AD06> { [ y, Y, U01B4, U01B3 ] };	// SMALL LETTER Y, CAPITAL LETTER Y, SMALL LETTER Y WITH HOOK, CAPITAL LETTER Y WITH HOOK
 	key <AD07> { [ u, U, U0289, U0244 ] };	// SMALL LETTER U, CAPITAL LETTER U, SMALL LETTER U BAR, CAPITAL LETTER U BAR
 	key <AD08> { [ i, I, U0268, U0197 ] };	// SMALL LETTER I, CAPITAL LETTER I, SMALL LETTER I BAR, CAPITAL LETTER I BAR
 	key <AD09> { [ o, O, U0254, U0186 ] };	// SMALL LETTER O, CAPITAL LETTER O, SMALL LETTER OPEN O, CAPITAL LETTER OPEN O
 	key <AD10> { [ p, P, U00F8, U00D8 ] };	// SMALL LETTER P, CAPITAL LETTER P, SMALL LETTER O BAR, CAPITAL LETTER O BAR
 	key <AD11> { [ U0301, U030C, dead_circumflex, dead_diaeresis ] };	// COMBINING HIGH TONE, COMBINING RISING TONE, DEAD CIRCUMFLEX, DEAD DIAERESIS
 	key <AD12> { [ U0330, U0303, U0304, U030D ] };	// COMBINING TILDE (NASAL) BELOW, COMBINING TILDE (NASAL), COMBINING MID TONE, COMBINING VERTICAL LINE ABOVE
 	key <AE01> { [ U0026, KP_1, U00B9, U2018 ] };	// AMPERSAND, 1, SUPERSCRIPT 1, LEFT SINGLE QUOTE
 	key <AE02> { [ eacute, KP_2, asciitilde, U2019 ] };	// SMALL LETTER E WITH ACUTE, 2, TILDE, RIGHT SINGLE QUOTE
 	key <AE03> { [ U0022, KP_3, U0025 ] };	// QUOTATION MARK, 3, PERCENT SIGN
 	key <AE04> { [ U0027, KP_4, U007B ] };	// APOSTROPHE, 4, LEFT CURLY BRACKET
 	key <AE05> { [ U0028, KP_5, U005B, numbersign ] };	// LEFT PARENTHESIS, 5, LEFT SQUARE BRACKET, NUMBER SIGN
 	key <AE06> { [ U002D, KP_6, U007C ] };	// HYPHEN/MINUS, 6, BAR
 	key <AE07> { [ U00E8, KP_7, U0300 ] };	// SMALL LETTER E WITH GRAVE, 7, COMBINING GRAVE
 	key <AE08> { [ underscore, KP_8, backslash, U20D6 ] };	// UNDERSCORE, 8, BACKSLASH, COMBINING LEFT ARROW ABOVE
 	key <AE09> { [ ccedilla, KP_9, U005E] };	// SMALL LETTER C WITH CEDILLA, 9, CIRCUMFLEX
 	key <AE10> { [ U00E0, KP_0, at, U20D7 ] };	// SMALL LETTER A WITH GRAVE
 	key <AE11> { [ U0029, U00B0, U005D ] };	// RIGHT PARENTHESIS, DEGREE, RIGHT SQUARE BRACKET
 	key <AE12> { [ U003D, U002B, U007D, U00B1 ] };	// EQUAL SIGN, PLUS SIGN, RIGHT CURLY BRACKET, PLUS-MINUS SIGN
 	key <BKSL> { [ U1DC6, U1DC7, KP_Multiply, U00A4 ] };	//  COMBINING MID-LOW, COMBINING HIGH-MID, MULTIPLY, CURRENCY SIGN
 	key <LSGT> { [ U003C, U003E, U00AB, U00BB ] };	// LESS THAN, GREATER THAN, LEFT GUILLEMET, RIGHT GUILLEMET
 	key <TLDE> { [ U0024, U20AC, U00B2, U00B3 ] };	// DOLLAR, EURO, SUPERSCRIPT 2, SUPERSCRIPT 3
 	include "cm(exclamation_switch)"
  };
 partial modifier_keys
 xkb_symbols "exclamation_switch" {
 	key <AB10> {
 	symbols[Group1] = [ ISO_Level3_Latch,	U00A7,	exclam,	U00A7 ]
 	};
 	modifier_map Mod5	{ ISO_Level3_Latch };
 };

===Addition to /usr/share/X11/xkb/rules/evdev.xml===

 <layout>
      <configItem>
        <name>cm</name>
        <shortDescription>cam</shortdescription>
        <description>Cameroon Azerty</description>
        <languageList>
              <iso639Id>frn</iso639id>
              <iso639Id>bas</iso639id>
              <iso639Id>nmg</iso639id>
              <iso639Id>fub</iso639id>
              <iso639Id>ewo</iso639id>
              <iso639Id>xmd</iso639id>
              <iso639Id>mfh</iso639id>
              <iso639Id>bkm</iso639id>
              <iso639Id>ozm</iso639id>
              <iso639Id>lns</iso639id>
              <iso639Id>sox</iso639id>
              <iso639Id>pny</iso639id>
              <iso639Id>wes</iso639id>
              <iso639Id>lem</iso639id>
              <iso639Id>nyj</iso639id>
              <iso639Id>mfk</iso639id>
              <iso639Id>mcp</iso639id>
              <iso639Id>ass</iso639id>
              <iso639Id>xed</iso639id>
              <iso639Id>dua</iso639id>
              <iso639Id>anv</iso639id>
              <iso639Id>bum</iso639id>
              <iso639Id>btb</iso639id>
              <iso639Id>bfd</iso639id>
              <iso639Id>azo</iso639id>
              <iso639Id>ken</iso639id>
              <iso639Id>yam</iso639id>
              <iso639Id>yat</iso639id>
              <iso639Id>yas</iso639id>
            </languagelist>
      </configitem>
    </layout>
Clone this wiki locally