Example Keyboards

From LSDevLinux
Jump to: navigation, search

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 alphanumeric_keys
xkb_symbols "qwerty"
{
	name[Group1] = "Cameroon Anglophone";
	include "level3(ralt_switch)"
	include "us(basic)"
	key <AB01> { [ z, Z, U2026, U2020 ] };	// SMALL LETTER Z, CAPITAL LETTER Z, ELLIPSIS, DAGGER
	key <AB02> { [ x, X ] };	// SMALL LETTER X, CAPITAL LETTER X
	key <AB03> { [ c, C, U0327, U00A9 ] };	// SMALL LETTER C, CAPITAL LETTER C, CEDILLA, COPYRIGHT
	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> { [ m, M, NoSymbol, U2122 ] };	// SMALL LETTER M, CAPITAL LETTER M, , TRADEMARK SIGN
	key <AB08> { [ U002C, U003C, U2039, U00AB ] };	// COMMA, LESS THAN SIGN, LEFT SINGLE GUILLEMET, LEFT DOUBLE GUILLEMET
	key <AB09> { [ U002E, U003E, U203A, U00BB ] };	// PERIOD, GREATER THAN SIGN, RIGHT SINGLE GUILLEMET, RIGHT DOUBLE GUILLEMET
	key <AB10> { [ U002F, U003F, U00F7 ] };	// SLASH, QUESTION MARK, DIVISION SIGN
	key <AC01> { [ a, A, U025B, U0190 ] };	// SMALL LETTER A, CAPITAL LETTER A, SMALL LETTER OPEN E, CAPITAL LETTER OPEN E
	key <AC02> { [ s, S ] };	// SMALL LETTER S, CAPITAL LETTER S
	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, U0330, U0323 ] };	// SMALL LETTER J, CAPITAL LETTER J, COMBINING TILDE (NASAL) BELOW, COMBINING DOT BELOW
	key <AC08> { [ k, K, U1DC5, U1DC7 ] };	// SMALL LETTER K, CAPITAL LETTER K, COMBINING LOW-MID TONE, COMBINING HIGH-MID
	key <AC09> { [ l, L, U1DC6, U1DC4 ] };	// SMALL LETTER L, CAPITAL LETTER L, COMBINING MID-LOW, COMBINING MID-HIGH TONE
	key <AC10> { [ U003B, U003A ] };	// SEMICOLON, COLON
	key <AC11> { [ U0300, U0302, U0027, U0022 ] };	// COMBINING LOW TONE, COMBINING FALLING TONE, APOSTROPHE, QUOTATION MARK
	key <AD01> { [ q, Q, U2014, U2013 ] };	// SMALL LETTER Q, CAPITAL LETTER Q, EM DASH, EN DASH
	key <AD02> { [ w, W, U1E85, U1E84 ] };	// SMALL LETTER W, CAPITAL LETTER W, SMALL LETTER W WITH DIAERESIS, CAPITAL LETTER W WITH DIAERESIS
	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, U005B, U007B ] };	// COMBINING HIGH TONE, COMBINING RISING TONE, LEFT SQUARE BRACKET, LEFT CURLY BRACKET
	key <AD12> { [ U0327, U0308, U005D, U007D ] };	// COMBINING CEDILLA, COMBINING DIAERESIS, RIGHT SQUARE BRACKET, RIGHT CURLY BRACKET
	key <AE01> { [ U0031, U0021, U00BC ] };	// 1, EXCLAMATION POINT, ONE QUARTER
	key <AE02> { [ U0032, U0040, U00BD ] };	//2, AT SYMBOL, ONE HALF
	key <AE03> { [ U0033, U0023, U00BE ] };	// 3, NUMBER SIGN, THREE QUARTERS
	key <AE04> { [ U0034, U0024, NoSymbol, U20AC ] };	// 4, DOLLAR, , EURO SIGN
	key <AE08> { [ U0038, U002A, NoSymbol, U00D7 ] };	// 8, ASTERISK, , MATH MULTIPLY
	key <AE09> { [ U0039, U0028, U2018, U201C ] };	// 9, LEFT PARENTHESIS, LEFT SINGLE QUOTE MARK, LEFT DOUBLE QUOTE MARK
	key <AE10> { [ U0030, U0029, U2019, U201D ] };	// 0, RIGHT PARENTHESIS, RIGHT SINGLE QUOTE MARK, LEFT DOUBLE QUOTE MARK
	key <AE11> { [ U002D, U005F, U0304 ] };	// MINUS, UNDERSCORE, COMBINING MID TONE, COMBINING MID TONE
	key <AE12> { [ U003D, U002B, NoSymbol, U00B1 ] };	// EQUAL, PLUS, , PLUS-MINUS
	key <BKSL> { [ U005C, U007C ] };	// BACKSLASH, BAR
	key <TLDE> { [ U030D, U0303, U0060, U007E ] };	// COMBINING VERTICAL LINE ABOVE, COMBINING TILDE ABOVE, GRAVE ACCENT, TILDE
	include "cm(semicolon_switch)"
};

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>