French accent on Qwerty keyboard, for X11

Here is a way to get a full French accent support in my X applications, and to keep the advantages (mainly programming ones) of the qwerty layout.Just append the following to your file "/etc/X11/xkb/symbols/us" (kubuntu breezy) :

  partial alphanumeric_keys  xkb_symbols "fr" {

name[Group1]= "U.S. English - International (with dead keys)";

include "us(basic)"

// Alphanumeric section

key { [ grave, asciitilde, dead_grave, dead_tilde ] };

key { [ 1, exclam, exclamdown, onesuperior ] };

key { [ 2, at, twosuperior, dead_doubleacute ] };

key { [ 3, numbersign, threesuperior, dead_macron ] };

key { [ 4, dollar, currency, sterling ] };

key { [ 5, percent, EuroSign ] };

key { [ 6,asciicircum, onequarter, dead_circumflex ] };

key { [ 7, ampersand, onehalf, dead_horn ] };

key { [ 8, asterisk, threequarters, dead_ogonek ] };

key { [ 9, parenleft, leftsinglequotemark, dead_breve ] };

key { [ 0, parenright, rightsinglequotemark, dead_abovering ] };

key { [ minus, underscore, yen, dead_belowdot ] };

key { [ equal, plus, multiply, division ] };

key { [ q, Q, adiaeresis, Adiaeresis ] };

key { [ w, W, aring, Aring ] };

key { [ e, E, eacute, Eacute ] };

key { [ r, R, registered, registered ] };

key { [ t, T, thorn, THORN ] };

key { [ y, Y, udiaeresis, Udiaeresis ] };

key { [ u, U, ugrave, Ugrave ] };

key { [ i, I, idiaeresis, Idiaeresis ] };

key { [ o, O, ocircumflex, Ocircumflex ] };

key { [ p, P, odiaeresis, Odiaeresis ] };

key { [ bracketleft, braceleft, guillemotleft, guillemotleft ] };

key { [bracketright, braceright, guillemotright,guillemotright ] };

key { [ a, A, agrave, Agrave ] };

key { [ s, S, ssharp, section ] };

key { [ d, D, eth, ETH ] };

key { [ l, L, oslash, Ooblique ] };

key { [ semicolon, colon, paragraph, degree ] };

key { [apostrophe, quotedbl, dead_acute, dead_diaeresis ] };

key { [ z, Z, ae, AE ] };

key { [ c, C, copyright, cent ] };

key { [ n, N, ntilde, Ntilde ] };

key { [ m, M, mu, mu ] };

key { [ comma, less, ccedilla, Ccedilla ] };

key { [ period, greater, dead_abovedot, dead_caron ] };

key { [ slash, question, questiondown, dead_hook ] };

key { [ backslash, bar, notsign, brokenbar ] };

include "level3(ralt_switch)"

};

All it does is just keeping the original qwerty layout, adding it the AltGr+vowel combinations of the common accentuated characters. AltGr+Accent followed by a letter add the accent to the given letter.

A new variant of the us layout is then available, called "fr" and accessible via the command "setxkbmap -model pc105 -layout us -variant fr"