// $XFree86: xc/programs/xkbcomp/types/caps,v 1.3 2002/11/26 02:14:02 dawes Exp $

// CapsLock uses internal capitalization rules
// Shift cancels CapsLock
partial xkb_types "internal" {
    type "ALPHABETIC" {
	modifiers = Shift+Lock;
	map[Shift] = Level2;
	preserve[Lock] = Lock;
	level_name[Level1] = "Base";
	level_name[Level2] = "Caps";
    };

    type "FOUR_LEVEL_ALPHABETIC" {
	modifiers = Shift+Lock+LevelThree;
	map[None] = Level1;
	map[Shift] = Level2;
	preserve[Lock] = Lock;
	map[LevelThree] = Level3;
	map[Shift+LevelThree] = Level4;
	map[Lock+LevelThree] =  Level3;
        map[Lock+Shift+LevelThree] = Level3;
	preserve[Lock+LevelThree] = Lock;
	level_name[Level1] = "Base";
	level_name[Level2] = "Shift";
	level_name[Level3] = "Alt Base";
	level_name[Level4] = "Shift Alt";
    };

    type "FOUR_LEVEL_SEMIALPHABETIC" {
	modifiers = Shift+Lock+LevelThree;
	map[None] = Level1;
	map[Shift] = Level2;
	preserve[Lock] = Lock;
	map[LevelThree] = Level3;
	map[Shift+LevelThree] = Level4;
	map[Lock+LevelThree] =  Level3;
        map[Lock+Shift+LevelThree] = Level4;
	preserve[Lock+LevelThree] = Lock;
	preserve[Lock+Shift+LevelThree] = Lock;
	level_name[Level1] = "Base";
	level_name[Level2] = "Shift";
	level_name[Level3] = "Alt Base";
	level_name[Level4] = "Shift Alt";
    };
};
// CapsLock uses internal capitalization rules
// Shift doesn't cancel CapsLock
partial xkb_types "internal_nocancel" {
    type "ALPHABETIC" {
	modifiers = Shift;
	map[Shift] = Level2;
	level_name[Level1] = "Base";
	level_name[Level2] = "Caps";
    };

    type "FOUR_LEVEL_ALPHABETIC" {
	modifiers = Shift+LevelThree;
	map[None] = Level1;
	map[Shift] = Level2;
	map[LevelThree] = Level3;
	map[Shift+LevelThree] = Level4;
	level_name[Level1] = "Base";
	level_name[Level2] = "Shift";
	level_name[Level3] = "Alt Base";
	level_name[Level4] = "Shift Alt";
    };

    type "FOUR_LEVEL_SEMIALPHABETIC" {
        // the same as FOUR_LEVEL_ALPHABETIC
	modifiers = Shift+LevelThree;
	map[None] = Level1;
	map[Shift] = Level2;
	map[LevelThree] = Level3;
	map[Shift+LevelThree] = Level4;
	level_name[Level1] = "Base";
	level_name[Level2] = "Shift";
	level_name[Level3] = "Alt Base";
	level_name[Level4] = "Shift Alt";
    };
};
// CapsLock acts as Shift with locking
// Shift cancels CapsLock
partial xkb_types "shift" {
    type "ALPHABETIC" {
	modifiers = Shift+Lock;
	map[Shift] = Level2;
	map[Lock] = Level2;
	level_name[Level1] = "Base";
	level_name[Level2] = "Caps";
    };

    type "FOUR_LEVEL_ALPHABETIC" {
	modifiers = Shift+Lock+LevelThree;
	map[None] = Level1;
	map[Shift] = Level2;
	map[Lock]  = Level2;
	map[LevelThree] = Level3;
	map[Shift+LevelThree] = Level4;
	map[Lock+LevelThree] =  Level4;
	map[Shift+Lock+LevelThree] =  Level3;
	level_name[Level1] = "Base";
	level_name[Level2] = "Shift";
	level_name[Level3] = "Alt Base";
	level_name[Level4] = "Shift Alt";
    };

    type "FOUR_LEVEL_SEMIALPHABETIC" {
	modifiers = Shift+Lock+LevelThree;
	map[None] = Level1;
	map[Shift] = Level2;
	map[Lock]  = Level2;
	map[LevelThree] = Level3;
	map[Shift+LevelThree] = Level4;
	map[Lock+LevelThree] =  Level3;
        map[Lock+Shift+LevelThree] = Level4;
	preserve[Lock+LevelThree] = Lock;
	preserve[Lock+Shift+LevelThree] = Lock;
	level_name[Level1] = "Base";
	level_name[Level2] = "Shift";
	level_name[Level3] = "Alt Base";
	level_name[Level4] = "Shift Alt";
    };
};
// CapsLock acts as Shift with locking
// Shift doesn't cancel CapsLock
partial xkb_types "shift_nocancel" {
    type "ALPHABETIC" {
	modifiers = Shift+Lock;
	map[Shift] = Level2;
	map[Lock] = Level2;
	map[Shift+Lock] = Level2;
	level_name[Level1] = "Base";
	level_name[Level2] = "Caps";
    };

    type "FOUR_LEVEL_ALPHABETIC" {
	modifiers = Shift+Lock+LevelThree;
	map[None] =  Level1;
	map[Shift] = Level2;
	map[Lock] =  Level2;
	map[Shift+Lock] = Level2;
	map[LevelThree] = Level3;
	map[Shift+LevelThree] = Level4;
	map[Lock+LevelThree] =  Level4;
	map[Shift+Lock+LevelThree] = Level4;
	level_name[Level1] = "Base";
	level_name[Level2] = "Shift";
	level_name[Level3] = "Alt Base";
	level_name[Level4] = "Shift Alt";
    };

    type "FOUR_LEVEL_SEMIALPHABETIC" {
	modifiers = Shift+Lock+LevelThree;
	map[None] =  Level1;
	map[Shift] = Level2;
	map[Lock] =  Level2;
	map[Shift+Lock] = Level2;
	map[LevelThree] = Level3;
	map[Shift+LevelThree] = Level4;
	map[Lock+LevelThree] =  Level3;
        map[Lock+Shift+LevelThree] = Level4;
	preserve[Lock+LevelThree] = Lock;
	preserve[Lock+Shift+LevelThree] = Lock;
	level_name[Level1] = "Base";
	level_name[Level2] = "Shift";
	level_name[Level3] = "Alt Base";
	level_name[Level4] = "Shift Alt";
    };
};
