Edit

kc3-lang/libxkbcommon/test/data/keymaps/integers.xkb

Branch :

  • Show log

    Commit

  • Author : Pierre Le Marre
    Date : 2025-04-04 16:38:16
    Hash : d5a91fa9
    Message : xkbcomp: Use custom parsers instead of strtol* The use of `strtol*` functions was already restricted due to its slowness and its capacity to parse other stuff than digits (e.g. signs and spaces). There is also another *big* limitation: it requires a NULL-terminated string. This is incompatible with our functions that work on buffers, because we cannot guarantee this. This may lead to a memory violation if the last token is a number. We now roll out our own parsers, which are more efficients and compatible with buffers.

  • test/data/keymaps/integers.xkb
  • xkb_keymap {
    xkb_keycodes {
    	minimum = 1;
    	maximum = 255;
    	<>                   = 1;
    	indicator 32 = "xxx";
    };
    
    xkb_types {
    	type "default" {
    		modifiers= none;
    	};
    };
    
    xkb_compatibility {
    	interpret.useModMapMods= AnyLevel;
    	interpret.repeat= False;
    };
    
    xkb_symbols {
    	key <>                   {
    		repeat= No,
    		symbols[Group1]= [                       NoSymbol ],
    		actions[Group1]= [              MovePtr(x=0,y=+0) ],
    		symbols[Group2]= [                       NoSymbol ],
    		actions[Group2]= [           MovePtr(x=2,y=32766) ]
    	};
    };
    
    };