13 open (XPROP, "xprop -root |") or die "Could not start xprop";
16 if (/_XKB_RULES_NAMES\(STRING\) = \"(.*)\", \"(.*)\", \"(.*)\", \"(.*)\", \"(.*)\"/)
18 ( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions ) =
19 ( $1, $2, $3, $4, $5 ) ;
28 my ( $xkbRules, $xkbModel, $xkbLayouts, $xkbVariants, $xkbOptions ) = @_;
29 ( system ( "setxkbmap",
32 "-layout", $xkbLayouts,
33 "-variant", $xkbVariants,
34 "-option", $xkbOptions ) == 0 ) or die "Could not set xkb configuration";
37 sub restoreXkbSettings
39 setXkbSettings( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions );
44 my ( $xkbRules, $xkbModel, $xkbLayouts, $xkbVariants, $xkbOptions ) = @_;
45 print "rules: [$xkbRules]\n" ;
46 print "model: [$xkbModel]\n" ;
47 print "layouts: [$xkbLayouts]\n" ;
48 print "variants: [$xkbVariants]\n" ;
49 print "options: [$xkbOptions]\n" ;
54 my ( $type, $idx ) = @_;
56 open ( XSLTPROC, "xsltproc --stringparam type $type listCIs.xsl ../rules/base.xml.in |" ) or
57 die ( "Could not start xsltproc" );
64 print "--- setting $type: [$paramValue]\n";
65 my @params = ( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions );
66 @params[$idx] = $paramValue;
67 dumpXkbSettings ( @params );
68 setXkbSettings ( @params );
76 dumpXkbSettings( $origXkbRules, $origXkbModel, $origXkbLayouts, $origXkbVariants, $origXkbOptions );
78 testLevel1( "model", 1 );