Hash :
5b5b67f2
Author :
Date :
2023-05-01T22:30:41
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
xkb_keymap {
xkb_keycodes "test" {
minimum = 8;
maximum = 255;
<LVL3> = 92;
<LFSH> = 50;
<RTSH> = 62;
<LALT> = 64;
<RALT> = 108;
<LWIN> = 133;
<RWIN> = 134;
<LCTL> = 37;
<RCTL> = 105;
<CAPS> = 66;
<AD01> = 24;
<AD02> = 25;
<AD03> = 26;
<AD04> = 27;
<AD05> = 28;
<AD06> = 29;
<AD07> = 30;
<AD08> = 31;
<AD09> = 32;
};
xkb_types "complete" {
type "ONE_LEVEL" {
modifiers= none;
level_name[Level1]= "Any";
};
type "TWO_LEVEL" {
modifiers= Shift;
map[Shift]= 2;
level_name[1]= "Base";
level_name[2]= "Shift";
};
};
xkb_compatibility "complete" {
interpret.useModMapMods= AnyLevel;
interpret.repeat= False;
interpret.locking= False;
interpret Any+AnyOf(all) {
action= SetMods(modifiers=modMapMods,clearLocks);
};
};
xkb_symbols {
name[group1]="Test";
// Reset modmap with a key with empty modmap
key <LVL3> { [VoidSymbol] };
modmap None { <LVL3> };
// Reset modmap with one key
key <LFSH> { [Shift_L] };
modmap Shift { <LFSH> };
modmap none { <LFSH> };
// Reset modmap with one symbol
key <RTSH> { [Shift_R] };
modmap Shift { Shift_R };
modmap NONE { Shift_R };
// Cycle
key <LWIN> { [Super_L] };
modmap Mod4 { <LWIN> };
modmap None { <LWIN> };
modmap Mod4 { <LWIN> };
// Cycle
key <RWIN> { [Super_R] };
modmap Mod4 { <RWIN> };
modmap None { <RWIN> };
modmap Mod4 { Super_R };
// Mix keycode and keysym
key <LCTL> { [Control_L] };
modmap Control { Control_L };
modmap None { <LCTL> };
// Mix keycode and keysym
key <RCTL> { [Control_R] };
modmap Control { <RCTL> };
modmap None { Control_R };
// Re-set with different modifier
key <LALT> { [Alt_L] };
modmap Mod2 { <LALT> };
modmap None { <LALT> };
modmap Mod1 { <LALT> };
// Re-set with different modifier with both key and keysym
key <RALT> { [ISO_Level3_Shift] };
modmap Mod1 { <RALT> }; // Mod1
modmap None { <RALT> }; // None
modmap Mod2 { <RALT> }; // Mod2
modmap Mod3 { ISO_Level3_Shift }; // Mod2 | Mod3
modmap None { ISO_Level3_Shift }; // Mod2
modmap Mod5 { ISO_Level3_Shift }; // Mod2 | Mod5
// Re-set with different modifier with both key and keysym
key <CAPS> { [Caps_Lock] };
modmap Mod1 { Caps_Lock }; // Mod1
modmap None { <CAPS> }; // Mod1
modmap None { Caps_Lock }; // None
modmap Lock { <CAPS> }; // Lock
// Merge modes
key <AD01> { [q] };
modMap Mod1 { <AD01> };
augment modMap None { <AD01> };
key <AD02> { [w] };
modMap Mod2 { <AD02> };
override modMap None { <AD02> };
key <AD03> { [e] };
modMap Mod3 { <AD03> };
replace modMap None { <AD03> };
key <AD04> { [r] };
modMap Mod1 { <AD04> };
augment modMap None { r };
key <AD05> { [t] };
modMap Mod2 { <AD05> };
replace modMap None { t };
key <AD06> { [y] };
modMap Mod3 { <AD06> };
override modMap None { y };
key <AD07> { [u] };
modMap Mod1 { <AD07> };
replace key <AD07> { [U] }; // Won’t affect the modMap
key <AD08> { [i] };
modMap Mod2 { i, I };
replace key <AD08> { [I] };
modMap None { i }; // Does not resolve
key <AD09> { [1] };
modMap Mod3 { 1, 2 };
override key <AD09> { [NoSymbol, 2] };
modMap None { 1 };
};
};