#!/bin/sh setxkbmap us -option # clean slate xkbcomp $DISPLAY out.xkb # output current keymap xkbcomp out.xkb $DISPLAY # work with xkbcomp-produced keymap xkbcomp $DISPLAY out.xkb # remove some meaningless diff patch out.xkb -o patched.xkb << 'EOF' --- out.xkb 2014-05-16 17:28:18.000000000 +0300 +++ patched.xkb 2014-05-16 17:31:29.000000000 +0300 @@ -590,6 +590,16 @@ level_name[Level3]= "Alt Base"; level_name[Level4]= "Alt Number"; }; + type "CTRL+ALT_ACTUALLY" { + modifiers= Control+Alt; + map[Control]= Level2; + map[Alt]= Level3; + map[Control+Alt]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Ctrl"; + level_name[Level3]= "Alt"; + level_name[Level4]= "Ctrl+Alt"; + }; }; xkb_compatibility "complete" { @@ -1322,7 +1332,12 @@ }; key { [ Linefeed ] }; key { [ Home ] }; - key { [ Up ] }; + key { + type= "CTRL+ALT_ACTUALLY", + repeat= Yes, + symbols[Group1]= [ Up, Up, Prior, Home ], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=,clearMods= Alt), RedirectKey(key=,clearMods= Control+Alt) ] + }; key { [ Prior ] }; key { [ Left ] }; key { [ Right ] }; EOF xkbcomp patched.xkb $DISPLAY xkbcomp $DISPLAY out2.xkb diff -u patched.xkb out2.xkb # does this show something?