Edit

kc3-lang/libxkbcommon/test/data/compat/merge_modes

Branch :

  • Show log

    Commit

  • Author : Pierre Le Marre
    Date : 2025-03-19 14:11:52
    Hash : 636b8b97
    Message : test: Add merge mode tests for all the sections The merge modes tests C file is now only generated locally, because it is too large. The generator Python script requires Jinja2, so the test is optional and depends on Jinja22 availability. The test aim to be exhaustive with various combinations of a base and an update: - plain base + plain update, for every mode - plain base + include (for every mode) update (every mode) - single include (base +| update)

  • test/data/compat/merge_modes
  • // WARNING: This file was auto-generated by: scripts/update-merge-modes-tests.py
    xkb_compat "base-default" {
    	virtual_modifiers NumLock;
    
    	interpret.repeat= False;
    	setMods.clearLocks= True;
    	latchMods.clearLocks= True;
    	latchMods.latchToLock= True;
    
    	interpret Any + Any {
    		action= SetMods(modifiers=modMapMods);
    	};
    
    	interpret Caps_Lock {
    		action = LockMods(modifiers = Lock);
    	};
    
    	indicator "Caps Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Lock;
    	};
    
    	indicator "Num Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= NumLock;
    	};
    };
    xkb_compat "base-augment" {
    	augment virtual_modifiers NumLock;
    
    	interpret.repeat= False;
    	setMods.clearLocks= True;
    	latchMods.clearLocks= True;
    	latchMods.latchToLock= True;
    
    	augment interpret Any + Any {
    		action= SetMods(modifiers=modMapMods);
    	};
    
    	augment interpret Caps_Lock {
    		action = LockMods(modifiers = Lock);
    	};
    
    	augment indicator "Caps Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Lock;
    	};
    
    	augment indicator "Num Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= NumLock;
    	};
    };
    xkb_compat "base-override" {
    	override virtual_modifiers NumLock;
    
    	interpret.repeat= False;
    	setMods.clearLocks= True;
    	latchMods.clearLocks= True;
    	latchMods.latchToLock= True;
    
    	override interpret Any + Any {
    		action= SetMods(modifiers=modMapMods);
    	};
    
    	override interpret Caps_Lock {
    		action = LockMods(modifiers = Lock);
    	};
    
    	override indicator "Caps Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Lock;
    	};
    
    	override indicator "Num Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= NumLock;
    	};
    };
    xkb_compat "base-replace" {
    	replace virtual_modifiers NumLock;
    
    	interpret.repeat= False;
    	setMods.clearLocks= True;
    	latchMods.clearLocks= True;
    	latchMods.latchToLock= True;
    
    	replace interpret Any + Any {
    		action= SetMods(modifiers=modMapMods);
    	};
    
    	replace interpret Caps_Lock {
    		action = LockMods(modifiers = Lock);
    	};
    
    	replace indicator "Caps Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Lock;
    	};
    
    	replace indicator "Num Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= NumLock;
    	};
    };
    xkb_compat "update-default" {
    	virtual_modifiers NumLock;
    
    	interpret.repeat= False;
    	setMods.clearLocks= False; // Changed
    
    	// Unchanged
    	interpret Any + Any {
    		action= SetMods(modifiers=modMapMods);
    	};
    
    	// Changed
    	interpret Caps_Lock {
    		action = LockMods(modifiers = NumLock);
    	};
    
    	// Unchanged
    	indicator "Caps Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Lock;
    	};
    
    	// Changed
    	indicator "Num Lock" {
    		!allowExplicit;
    		whichModState= Base;
    		modifiers= Lock;
    	};
    
    	// New
    	indicator "Kana" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Control;
    	};
    };
    xkb_compat "update-augment" {
    	augment virtual_modifiers NumLock;
    
    	augment interpret.repeat= False;
    	augment setMods.clearLocks= False; // Changed
    
    	// Unchanged
    	augment interpret Any + Any {
    		action= SetMods(modifiers=modMapMods);
    	};
    
    	// Changed
    	augment interpret Caps_Lock {
    		action = LockMods(modifiers = NumLock);
    	};
    
    	// Unchanged
    	augment indicator "Caps Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Lock;
    	};
    
    	// Changed
    	augment indicator "Num Lock" {
    		!allowExplicit;
    		whichModState= Base;
    		modifiers= Lock;
    	};
    
    	// New
    	augment indicator "Kana" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Control;
    	};
    };
    xkb_compat "update-override" {
    	override virtual_modifiers NumLock;
    
    	override interpret.repeat= False;
    	override setMods.clearLocks= False; // Changed
    
    	// Unchanged
    	override interpret Any + Any {
    		action= SetMods(modifiers=modMapMods);
    	};
    
    	// Changed
    	override interpret Caps_Lock {
    		action = LockMods(modifiers = NumLock);
    	};
    
    	// Unchanged
    	override indicator "Caps Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Lock;
    	};
    
    	// Changed
    	override indicator "Num Lock" {
    		!allowExplicit;
    		whichModState= Base;
    		modifiers= Lock;
    	};
    
    	// New
    	override indicator "Kana" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Control;
    	};
    };
    xkb_compat "update-replace" {
    	replace virtual_modifiers NumLock;
    
    	replace interpret.repeat= False;
    	replace setMods.clearLocks= False; // Changed
    
    	// Unchanged
    	replace interpret Any + Any {
    		action= SetMods(modifiers=modMapMods);
    	};
    
    	// Changed
    	replace interpret Caps_Lock {
    		action = LockMods(modifiers = NumLock);
    	};
    
    	// Unchanged
    	replace indicator "Caps Lock" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Lock;
    	};
    
    	// Changed
    	replace indicator "Num Lock" {
    		!allowExplicit;
    		whichModState= Base;
    		modifiers= Lock;
    	};
    
    	// New
    	replace indicator "Kana" {
    		!allowExplicit;
    		whichModState= Locked;
    		modifiers= Control;
    	};
    };