xkb_keymap <beginfold id='1'>{</beginfold id='1'>
    xkb_keycodes  <beginfold id='1'>{</beginfold id='1'> include "evdev+aliases(qwerty)" <endfold id='1'>}</endfold id='1'>;
    xkb_types     <beginfold id='1'>{</beginfold id='1'> include "complete"  <endfold id='1'>}</endfold id='1'>;
    xkb_compat    <beginfold id='1'>{</beginfold id='1'> include "complete"  <endfold id='1'>}</endfold id='1'>;
    xkb_symbols   <beginfold id='1'>{</beginfold id='1'> include "pc+us(dvorak)+inet(evdev)+terminate(ctrl_alt_bksp)"    <endfold id='1'>}</endfold id='1'>;
    xkb_geometry  <beginfold id='1'>{</beginfold id='1'> include "pc(pc105)" <endfold id='1'>}</endfold id='1'>;
<endfold id='1'>}</endfold id='1'>;

default partial alphanumeric_keys modifier_keys
xkb_symbols "basic" <beginfold id='1'>{</beginfold id='1'>
    include "us(basic)"
    include "/usr/share/X11/xkb/symbols/it"
    include "B(S1)|B(S2)"
    include "%S/de(basic)"
    override "B(S1)|B(S2)"

    name[Group1] = "Banana (US)";
 
    key <AE01> <beginfold id='1'>{</beginfold id='1'> [ exclam,          1]     <endfold id='1'>}</endfold id='1'>;
    key <AE12> <beginfold id='1'>{</beginfold id='1'> [ plus,            equal] <endfold id='1'>}</endfold id='1'>;
    key <A> <beginfold id='1'>{</beginfold id='1'> [Greek_alpha, Greek_ALPHA, ae, AE] <endfold id='1'>}</endfold id='1'>;
    key <AD05> <beginfold id='1'>{</beginfold id='1'> [t, T, tslash, Tslash] <endfold id='1'>}</endfold id='1'>;       // Type: FOUR_LEVEL_ALPHABETIC
    key <AD01> <beginfold id='1'>{</beginfold id='1'> [], [], [ q, Q ] <endfold id='1'>}</endfold id='1'>;
    key <AD05> <beginfold id='1'>{</beginfold id='1'> [ b, B, U1F966 ]<endfold id='1'>}</endfold id='1'>;
    key <> <beginfold id='1'>{</beginfold id='1'> [NoSymbol, a, b, <beginfold id='1'>{</beginfold id='1'>a, b<endfold id='1'>}</endfold id='1'>] <endfold id='1'>}</endfold id='1'>;

    key <LALT> <beginfold id='1'>{</beginfold id='1'> virtualModifier = Alt   <endfold id='1'>}</endfold id='1'>; // Alt is bound to <LALT>

    key <LALT> <beginfold id='1'>{</beginfold id='1'>
        symbols[Group1]=[Alt_L],
        actions[Group1]=[SetMods(modifiers=modMapMods)]

        repeat = False,
        [ Alt_L ]
    <endfold id='1'>}</endfold id='1'>;

    key <AD01> <beginfold id='1'>{</beginfold id='1'>
        type[Group1] = "TWO_LEVEL", // Type
        [q, Q]                      // Symbols
    <endfold id='1'>}</endfold id='1'>;

    key <LCTL> <beginfold id='1'>{</beginfold id='1'>
        symbols[1] = [ Control_L                                          ],
        actions[1] = [ <beginfold id='1'>{</beginfold id='1'> SetMods(modifiers=Control), SetGroup(group=+1) <endfold id='1'>}</endfold id='1'> ]
    <endfold id='1'>}</endfold id='1'>;

    override key <AC11> <beginfold id='1'>{</beginfold id='1'>[ agrave,      adiaeresis,     braceleft       ]<endfold id='1'>}</endfold id='1'>;
    replace key <PRSC> <beginfold id='1'>{</beginfold id='1'>[  Super_R,  Super_R  ]<endfold id='1'>}</endfold id='1'>;
    modifier_map Mod4 <beginfold id='1'>{</beginfold id='1'> <PRSC>, <RWIN> <endfold id='1'>}</endfold id='1'>;
    modifier_map Mod1 <beginfold id='1'>{</beginfold id='1'> <LALT>,<RALT> <endfold id='1'>}</endfold id='1'>;
<endfold id='1'>}</endfold id='1'>;
 
// Mandatory to extend the
! include %S/evdev
 
! option     = symbols
  custom:foo = +custom(bar)
  custom:baz = +other(baz)

// Explicit default section with no name required
partial alphanumeric_keys
xkb_symbols <beginfold id='1'>{</beginfold id='1'> include "us(basic)" <endfold id='1'>}</endfold id='1'>;

xkb_keycodes "jp106" <beginfold id='1'>{</beginfold id='1'>
    include "sgi_vndr/indigo(pc101)"
    <VOL-> = 122;
    <HZTG> = 22;
    alias <AE13> = <BKSL>;
    augment "sgi_vndr/indy(pc101)"
    alternate <BKSL> = 100;
    minimum = 8;
    maximum = 255;
<endfold id='1'>}</endfold id='1'>;

xkb_types <beginfold id='1'>{</beginfold id='1'>
    // ...
    type "TWO_LEVEL_PLUS_CONTROL" <beginfold id='1'>{</beginfold id='1'>
        modifiers = Shift + Control;
        map[None]          = Level1;
        map[Shift]         = Level2;
        map[Control]       = Level3;
        map[Control+Shift] = Level4;
        // Using preserve will make Control not consumed and allow
        // applications to detect keyboard shortcuts with alternative
        // keysyms in levels 3 and 4 rather than the levels 1 and 2.
        preserve[Control]       = Control;
        preserve[Control+Shift] = Control;
        preserve[Shift+Lock+LevelThree] = Lock;
        level_name[Level1] = "Base";
        level_name[Level2] = "Shift";
        level_name[Level3] = "Tweaked Control";
        level_name[Level4] = "Tweaked Control + Shift";
    <endfold id='1'>}</endfold id='1'>;
<endfold id='1'>}</endfold id='1'>;

default partial xkb_compatibility "basic" <beginfold id='1'>{</beginfold id='1'>
    interpret AccessX_Enable <beginfold id='1'>{</beginfold id='1'>
        action = LockControls(controls=AccessXKeys);
    <endfold id='1'>}</endfold id='1'>;
<endfold id='1'>}</endfold id='1'>;

default xkb_compatibility "basic" <beginfold id='1'>{</beginfold id='1'>
    virtual_modifiers  NumLock;

    interpret.repeat = False;
    setMods.clearLocks = True;
    latchMods.clearLocks = True;

    interpret Shift_Lock+AnyOf(Shift+Lock) <beginfold id='1'>{</beginfold id='1'>
        action = LockMods(modifiers=Shift);
    <endfold id='1'>}</endfold id='1'>;

    interpret Num_Lock+Any <beginfold id='1'>{</beginfold id='1'>
        virtualModifier = NumLock;
        action = LockMods(modifiers=NumLock);
    <endfold id='1'>}</endfold id='1'>;

    interpret Mode_switch <beginfold id='1'>{</beginfold id='1'>
        action = SetGroup(group=+1);
    <endfold id='1'>}</endfold id='1'>;

    interpret Any + Any <beginfold id='1'>{</beginfold id='1'>
        action = SetMods(modifiers=modMapMods);
    <endfold id='1'>}</endfold id='1'>;

    group 2 = Mod5;

    indicator "Shift Lock" <beginfold id='1'>{</beginfold id='1'>
        !allowExplicit;
        whichModState = Locked;
        modifiers = Shift;
    <endfold id='1'>}</endfold id='1'>;
<endfold id='1'>}</endfold id='1'>;
