Branch
Hash :
66f71890
Author :
Date :
2025-03-31T08:01:29
symbols: Enable writing keysyms list as UTF-8 strings
Each Unicode code point of the string will be translated to their
respective keysym, if possible. An empty string denotes `NoSymbol`.
When such conversion is not possible, this will raise a syntax error.
This introduces the following syntax:
```c
// Empty string = `NoSymbol`
key <1> {[""]}; // NoSymbol
// Single code point = single keysym
key <2> {["é"]}; // eacute
// String = translate each code point to their respective keysym
key <3> {["sßξك🎺"]}; // {s, ssharp, Greek_xi, Arabic_kaf, U1F3BA}
// Mix string and keysyms
key <4> {[{"ξ", Greek_kappa, "β"}]}; // { Greek_xi, Greek_kappa, Greek_beta}
```
It can also be used wherever a keysym is required, e.g. in `interpret`
and `modifier_map` statements. In these cases a single keysym is expected,
so the string should contain *exactly one* Unicode code point.
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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
xkb_keymap {
xkb_keycodes {
minimum = 8;
maximum = 255;
<10> = 10;
<11> = 11;
<12> = 12;
<20> = 20;
<21> = 21;
<22> = 22;
<23> = 23;
<24> = 24;
<25> = 25;
<30> = 30;
<31> = 31;
<32> = 32;
<33> = 33;
<34> = 34;
<35> = 35;
<40> = 40;
<41> = 41;
<42> = 42;
<50> = 50;
<51> = 51;
<52> = 52;
<60> = 60;
<61> = 61;
<62> = 62;
<63> = 63;
<64> = 64;
<65> = 65;
<66> = 66;
<67> = 67;
<68> = 68;
<69> = 69;
<70> = 70;
<71> = 71;
<72> = 72;
<73> = 73;
<74> = 74;
<AD08> = 80;
<AC05> = 81;
<AB05> = 82;
<AD01> = 83;
};
xkb_types "basic" {
virtual_modifiers NumLock;
type "ONE_LEVEL" {
modifiers= none;
level_name[1]= "Any";
};
type "TWO_LEVEL" {
modifiers= Shift;
map[Shift]= 2;
level_name[1]= "Base";
level_name[2]= "Shift";
};
type "ALPHABETIC" {
modifiers= Shift+Lock;
map[Shift]= 2;
map[Lock]= 2;
level_name[1]= "Base";
level_name[2]= "Caps";
};
};
xkb_compatibility {
virtual_modifiers NumLock;
interpret.useModMapMods= AnyLevel;
interpret.repeat= False;
interpret adiaeresis+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret U2728+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret U1F3BA+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret U1F54A+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret 0x01000001+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret Linefeed+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret 0x0100001f+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret space+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret asciitilde+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret Delete+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret 0x01000080+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret 0x0100009f+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret nobreakspace+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret ydiaeresis+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret UFDD0+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret UFDEF+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret UFFFE+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret UFFFF+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret U10000+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret U1FFFF+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
interpret U10FFFF+AnyOfOrNone(all) {
action= SetMods(modifiers=none);
};
};
xkb_symbols {
key <10> { [ NoSymbol, { b, c } ] };
key <11> { [ a, b ] };
key <20> { [ a, { b, c } ] };
key <23> { [ U2728, U1F3BA ] };
key <24> { [ { u, U0308 } ] };
key <25> { [ { U2200, partialderivative, elementof, U211D, logicaland, union, identical, infinity, space, uparrow, U2197, U21A8, U21BB, U21E3, space, uprightcorner, crossinglines, U2554, U2558, U2591, U25BA, U263A, femalesymbol, space, UFB01, UFFFD, U2440, twosubscript, U1F20, Babovedot, U04E5, Wdiaeresis, U0250, U02D0, U234E, hebrew_aleph, Armenian_AYB, Georgian_an } ] };
key <30> { [ a, { b, c } ] };
key <31> { [ a, { b, c } ] };
key <32> { [ a, { b, c } ] };
key <33> { [ U1F54A, { U1F3F3, UFE0F } ] };
key <34> { [ { u, U0308 } ] };
key <35> { [ { U2200, partialderivative, elementof, U211D, logicaland, union, identical, infinity, space, uparrow, U2197, U21A8, U21BB, U21E3, space, uprightcorner, crossinglines, U2554, U2558, U2591, U25BA, U263A, femalesymbol, space, UFB01, UFFFD, U2440, twosubscript, U1F20, Babovedot, U04E5, Wdiaeresis, U0250, U02D0, U234E, hebrew_aleph, Armenian_AYB, Georgian_an } ] };
key <40> { [ { a, b }, { c, d, e, f } ] };
key <41> { [ { a, b }, { c, d, e, f } ] };
key <42> { [ { a, b }, { c, d, e, f } ] };
key <50> { [ { a, b }, { c, d, e, f } ] };
key <51> { [ { a, b }, { c, d, e, f } ] };
key <52> { [ { a, b }, { c, d, e, f } ] };
key <60> { [ { a, b }, { c, d, e, f } ] };
key <61> { [ { a, b }, { c, d, e, f } ] };
key <63> { [ { a, b, c, d }, { e, f, g, h } ] };
key <64> { [ { a, b, c, d }, { e, f, g, h } ] };
key <65> { [ NoSymbol, U10FFFF ] };
key <66> { [ 0x01000001, Linefeed ] };
key <67> { [ 0x0100001f, space ] };
key <68> { [ asciitilde, Delete ] };
key <69> { [ 0x01000080, 0x0100009f ] };
key <70> { [ nobreakspace, ydiaeresis ] };
key <71> { [ UFFFD, UFFFD ] };
key <72> { [ UFDD0, UFDEF ] };
key <73> { [ UFFFE, UFFFF ] };
key <74> { [ U10000, U1FFFF ] };
key <AD08> { [ { i, j }, U0132 ] };
key <AC05> { [ { g, combining_tilde }, { G, combining_tilde } ] };
key <AB05> { [ { Arabic_lam, Arabic_alef }, { Arabic_lam, Arabic_maddaonalef } ] };
key <AD01> { [ { c, rightsinglequotemark, h }, { C, rightsinglequotemark, h } ] };
modifier_map Mod1 { <23>, <33> };
};
};