Skip to content

Instantly share code, notes, and snippets.

@Klemek
Last active April 16, 2020 06:52
Show Gist options
  • Save Klemek/bfc376fa9afa84234a1d8b2ed685fffb to your computer and use it in GitHub Desktop.
Save Klemek/bfc376fa9afa84234a1d8b2ed685fffb to your computer and use it in GitHub Desktop.
Alternative keyboard layout of "US international with AltGr dead keys" with french shortcuts

layout

To change the keyboard layout :

(On X11 unix systems) Backup and (sudo) edit /usr/share/X11/xkb/symbols/us

Replace

partial alphanumeric_keys
xkb_symbols "altgr-intl" {
...
};

With the code in the other file.

Unfortunately, adding a new xkb_symbols (and adding it to /usr/share/X11/xkb/rules/evdev.xml) will cause the AltGr key to become a normal Alt key.

http://people.uleth.ca/~daniel.odonnell/Blog/custom-keyboard-in-linuxx11

partial alphanumeric_keys
xkb_symbols "altgr-intl" {
include "us(intl)"
name[Group1]= "English (intl., with AltGr dead keys)";
// five dead keys moved into level3:
key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] };
key <AC11> { [apostrophe,quotedbl, dead_acute, dead_diaeresis ] };
// diversions from the MS Intl keyboard:
key <AE01> { [ 1, exclam, onesuperior, exclamdown ] };
// key <AD04> { [ r, R, ediaeresis, Ediaeresis ] };
key <AC07> { [ j, J, idiaeresis, Idiaeresis ] };
key <AB02> { [ x, X, oe, OE ] };
key <AB04> { [ v, V, registered, registered ] };
// onequarter etc (not in iso8859-15) moved to get three unshifted deadkeys:
// key <AE06> { [ 6, asciicircum, dead_circumflex, onequarter ] };
// key <AE07> { [ 7, ampersand, dead_horn, onehalf ] };
// key <AE08> { [ 8, asterisk, dead_ogonek, threequarters ] };
// klemek edit
// switch level3 shift with non shift
key <AE06> { [ 6, asciicircum, onequarter, dead_circumflex] };
key <AE07> { [ 7, ampersand, onehalf, dead_horn ] };
key <AE08> { [ 8, asterisk, threequarters, dead_ogonek ] };
// preference for this key
key <LSGT> { [ less, greater, less, greater ] };
// french shortcuts
key <AC01> { [ a, A, agrave, Agrave ] };
key <AC04> { [ f, F, egrave, Egrave ] };
key <AD07> { [ u, U, ugrave, Ugrave ] };
key <AD01> { [ q, Q, acircumflex, Acircumflex ] };
key <AD04> { [ r, R, ecircumflex, Ecircumflex ] };
key <AD06> { [ y, Y, ucircumflex, Ucircumflex ] };
key <AD08> { [ i, I, icircumflex, Icircumflex ] };
key <AD10> { [ p, P, ocircumflex, Ocircumflex ] };
include "level3(ralt_switch)"
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment