Merge branch 'add-built-in-keymaps' into 'master'

Add built in keymaps

See merge request Librem5/squeekboard!78
This commit is contained in:
David Boddie
2019-07-20 14:42:51 +00:00
15 changed files with 1241 additions and 292 deletions

View File

@ -44,9 +44,9 @@
<section angle="0"> <section angle="0">
<row orientation="1"> <row orientation="1">
<key keycode="0" name="ABC123" oref="altline" /> <key keycode="0" name="ABC123" oref="altline" />
<key keycode="150" name="I150" oref="altline" /> <key keycode="149" name="I149" oref="altline" />
<key keycode="65" name="SPCE" oref="spaceline" /> <key keycode="65" name="SPCE" oref="spaceline" />
<key keycode="60" name="AB09" oref="outline2" /> <key keycode="59" name="AB08" oref="outline2" />
<key keycode="36" name="RTRN" oref="outline7" /> <key keycode="36" name="RTRN" oref="outline7" />
</row> </row>
</section> </section>

View File

@ -0,0 +1,126 @@
<?xml version="1.0"?>
<geometry version="0.90">
<bounds x="0" y="10.000000" width="426.0000" height="296.5853"/>
<!-- Keycodes correspond to those used in /usr/share/X11/xkb/keycodes/evdev.
For Squeekboard, the values have no connection to evdev. They are only
used as indices into the keymap sent to the compositor. They must have
values in the range from 8 to 255. -->
<section angle="0">
<row orientation="1">
<key keycode="24" name="AD01" oref="outline2" />
<key keycode="25" name="AD02" oref="outline2" />
<key keycode="26" name="AD03" oref="outline2" />
<key keycode="27" name="AD04" oref="outline2" />
<key keycode="28" name="AD05" oref="outline2" />
<key keycode="29" name="AD06" oref="outline2" />
<key keycode="30" name="AD07" oref="outline2" />
<key keycode="31" name="AD08" oref="outline2" />
<key keycode="32" name="AD09" oref="outline2" />
<key keycode="33" name="AD10" oref="outline2" />
<key keycode="34" name="AD11" oref="outline2" />
</row>
</section>
<section angle="0">
<row orientation="1">
<key keycode="38" name="AC01" oref="outline2" />
<key keycode="39" name="AC02" oref="outline2" />
<key keycode="40" name="AC03" oref="outline2" />
<key keycode="41" name="AC04" oref="outline2" />
<key keycode="42" name="AC05" oref="outline2" />
<key keycode="43" name="AC06" oref="outline2" />
<key keycode="44" name="AC07" oref="outline2" />
<key keycode="45" name="AC08" oref="outline2" />
<key keycode="46" name="AC09" oref="outline2" />
<key keycode="47" name="AC10" oref="outline2" />
<key keycode="48" name="AC11" oref="outline2" />
</row>
</section>
<section angle="0">
<row orientation="1">
<key keycode="50" name="LFSH" oref="altline" />
<key keycode="52" name="AB01" oref="outline2" />
<key keycode="53" name="AB02" oref="outline2" />
<key keycode="54" name="AB03" oref="outline2" />
<key keycode="55" name="AB04" oref="outline2" />
<key keycode="56" name="AB05" oref="outline2" />
<key keycode="57" name="AB06" oref="outline2" />
<key keycode="58" name="AB07" oref="outline2" />
<key keycode="22" name="BKSP" oref="altline" />
</row>
</section>
<section angle="0">
<row orientation="1">
<key keycode="0" name="ABC123" oref="altline" />
<key keycode="149" name="I149" oref="altline" />
<key keycode="65" name="SPCE" oref="spaceline" />
<key keycode="59" name="AB08" oref="outline2" />
<key keycode="36" name="RTRN" oref="outline7" />
</row>
</section>
<outline id="outline2" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="32" y="0.000000"/>
<point x="32" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
<outline id="altline" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="48.39024" y="0.000000"/>
<point x="48.39024" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
<outline id="outline4" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="59.31707" y="0.000000"/>
<point x="59.31707" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
<outline id="outline5" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="59.31707" y="0.000000"/>
<point x="59.31707" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
<outline id="outline6" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="68.68292" y="0.000000"/>
<point x="68.68292" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
<outline id="outline7" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="88.97561" y="0.000000"/>
<point x="88.97561" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
<outline id="outline8" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="88.97561" y="0.000000"/>
<point x="88.97561" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
<outline id="outline9" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="109.2682" y="0.000000"/>
<point x="109.2682" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
<outline id="outline10" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="37.46341" y="0.000000"/>
<point x="37.46341" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
<outline id="outline13" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="79.60975" y="0.000000"/>
<point x="79.60975" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
<outline id="spaceline" corner-radius="1.000000">
<point x="0.000000" y="0.000000"/>
<point x="150.5853" y="0.000000"/>
<point x="150.5853" y="52.44877"/>
<point x="0.000000" y="52.44877"/>
</outline>
</geometry>

View File

@ -24,6 +24,9 @@
<keyboard id="my" name="my" <keyboard id="my" name="my"
geometry="compact" symbols="my" geometry="compact" symbols="my"
longname="Myanmar" language="my"/> longname="Myanmar" language="my"/>
<keyboard id="nb" name="nb"
geometry="extended" symbols="nb"
longname="Norwegian" language="nb"/>
<keyboard id="ru" name="ru" <keyboard id="ru" name="ru"
geometry="compact" symbols="us" geometry="compact" symbols="us"
longname="Russian" language="ru"/> longname="Russian" language="ru"/>

View File

@ -0,0 +1,308 @@
xkb_keymap {
xkb_keycodes "squeekboard" {
minimum = 8;
maximum = 255;
<ESC> = 9;
<AE01> = 10;
<AE02> = 11;
<AE03> = 12;
<AE04> = 13;
<AE05> = 14;
<AE06> = 15;
<AE07> = 16;
<AE08> = 17;
<AE09> = 18;
<AE10> = 19;
<AE11> = 20;
<AE12> = 21;
<BKSP> = 22;
<TAB> = 23;
<AD01> = 24;
<AD02> = 25;
<AD03> = 26;
<AD04> = 27;
<AD05> = 28;
<AD06> = 29;
<AD07> = 30;
<AD08> = 31;
<AD09> = 32;
<AD10> = 33;
<AD11> = 34;
<AD12> = 35;
<RTRN> = 36;
<LCTL> = 37;
<AC01> = 38;
<AC02> = 39;
<AC03> = 40;
<AC04> = 41;
<AC05> = 42;
<AC06> = 43;
<AC07> = 44;
<AC08> = 45;
<AC09> = 46;
<AC10> = 47;
<AC11> = 48;
<TLDE> = 49;
<LFSH> = 50;
<BKSL> = 51;
<AB01> = 52;
<AB02> = 53;
<AB03> = 54;
<AB04> = 55;
<AB05> = 56;
<AB06> = 57;
<AB07> = 58;
<AB08> = 59;
<AB09> = 60;
<AB10> = 61;
<RTSH> = 62;
<KPMU> = 63;
<LALT> = 64;
<SPCE> = 65;
<CAPS> = 66;
<FK01> = 67;
<FK02> = 68;
<FK03> = 69;
<FK04> = 70;
<FK05> = 71;
<FK06> = 72;
<FK07> = 73;
<FK08> = 74;
<FK09> = 75;
<FK10> = 76;
<NMLK> = 77;
<SCLK> = 78;
<KP7> = 79;
<KP8> = 80;
<KP9> = 81;
<KPSU> = 82;
<KP4> = 83;
<KP5> = 84;
<KP6> = 85;
<KPAD> = 86;
<KP1> = 87;
<KP2> = 88;
<KP3> = 89;
<KP0> = 90;
<KPDL> = 91;
<LVL3> = 92;
<LSGT> = 94;
<FK11> = 95;
<FK12> = 96;
<AB11> = 97;
<KATA> = 98;
<HIRA> = 99;
<HENK> = 100;
<HKTG> = 101;
<MUHE> = 102;
<JPCM> = 103;
<KPEN> = 104;
<RCTL> = 105;
<KPDV> = 106;
<PRSC> = 107;
<RALT> = 108;
<LNFD> = 109;
<HOME> = 110;
<UP> = 111;
<PGUP> = 112;
<LEFT> = 113;
<RGHT> = 114;
<END> = 115;
<DOWN> = 116;
<PGDN> = 117;
<INS> = 118;
<DELE> = 119;
<I120> = 120;
<MUTE> = 121;
<VOL-> = 122;
<VOL+> = 123;
<POWR> = 124;
<KPEQ> = 125;
<I126> = 126;
<PAUS> = 127;
<I128> = 128;
<I129> = 129;
<HNGL> = 130;
<HJCV> = 131;
<AE13> = 132;
<LWIN> = 133;
<RWIN> = 134;
<COMP> = 135;
<STOP> = 136;
<AGAI> = 137;
<PROP> = 138;
<UNDO> = 139;
<FRNT> = 140;
<COPY> = 141;
<OPEN> = 142;
<PAST> = 143;
<FIND> = 144;
<CUT> = 145;
<HELP> = 146;
<I147> = 147;
<I148> = 148;
<I149> = 149;
<I150> = 150;
<I151> = 151;
<I152> = 152;
<I153> = 153;
<I154> = 154;
<I155> = 155;
<I156> = 156;
<I157> = 157;
<I158> = 158;
<I159> = 159;
<I160> = 160;
<I161> = 161;
<I162> = 162;
<I163> = 163;
<I164> = 164;
<I165> = 165;
<I166> = 166;
<I167> = 167;
<I168> = 168;
<I169> = 169;
<I170> = 170;
<I171> = 171;
<I172> = 172;
<I173> = 173;
<I174> = 174;
<I175> = 175;
<I176> = 176;
<I177> = 177;
<I178> = 178;
<I179> = 179;
<I180> = 180;
<I181> = 181;
<I182> = 182;
<I183> = 183;
<I184> = 184;
<I185> = 185;
<I186> = 186;
<I187> = 187;
<I188> = 188;
<I189> = 189;
<I190> = 190;
<FK13> = 191;
<FK14> = 192;
<FK15> = 193;
<FK16> = 194;
<FK17> = 195;
<FK18> = 196;
<FK19> = 197;
<FK20> = 198;
<FK21> = 199;
<FK22> = 200;
<FK23> = 201;
<FK24> = 202;
<MDSW> = 203;
<ALT> = 204;
<META> = 205;
<SUPR> = 206;
<HYPR> = 207;
<I208> = 208;
<I209> = 209;
<I210> = 210;
<I211> = 211;
<I212> = 212;
<I213> = 213;
<I214> = 214;
<I215> = 215;
<I216> = 216;
<I217> = 217;
<I218> = 218;
<I219> = 219;
<I220> = 220;
<I221> = 221;
<I222> = 222;
<I223> = 223;
<I224> = 224;
<I225> = 225;
<I226> = 226;
<I227> = 227;
<I228> = 228;
<I229> = 229;
<I230> = 230;
<I231> = 231;
<I232> = 232;
<I233> = 233;
<I234> = 234;
<I235> = 235;
<I236> = 236;
<I237> = 237;
<I238> = 238;
<I239> = 239;
<I240> = 240;
<I241> = 241;
<I242> = 242;
<I243> = 243;
<I244> = 244;
<I245> = 245;
<I246> = 246;
<I247> = 247;
<I248> = 248;
<I249> = 249;
<I250> = 250;
<I251> = 251;
<I252> = 252;
<I253> = 253;
<I254> = 254;
<I255> = 255;
};
xkb_symbols "squeekboard" {
name[Group1] = "Letters";
name[Group2] = "Numbers/Symbols";
key <AD01> { [ q, Q ], [ 1, asciitilde ] };
key <AD02> { [ w, W ], [ 2, quoteleft ] };
key <AD03> { [ e, E ], [ 3, bar ] };
key <AD04> { [ r, R ], [ 4, U00B7 ] };
key <AD05> { [ t, T ], [ 5, squareroot ] };
key <AD06> { [ y, Y ], [ 6, Greek_pi ] };
key <AD07> { [ u, U ], [ 7, division ] };
key <AD08> { [ i, I ], [ 8, multiply ] };
key <AD09> { [ o, O ], [ 9, paragraph ] };
key <AD10> { [ p, P ], [ 0, U25B3 ] };
key <AD11> { [ aring, Aring ], [ U00B1, U00A7 ] };
key <AC01> { [ a, A ], [ at, copyright ] };
key <AC02> { [ s, S ], [ numbersign, U00AE ] };
key <AC03> { [ d, D ], [ dollar, U00A3 ] };
key <AC04> { [ f, F ], [ percent, EuroSign ] };
key <AC05> { [ g, G ], [ ampersand, U00A5 ] };
key <AC06> { [ h, H ], [ minus, underscore ] };
key <AC07> { [ j, J ], [ plus, equal ] };
key <AC08> { [ k, K ], [ U00FC, asciicircum ] };
key <AC09> { [ l, L ], [ U00F6, degree ] };
key <AC10> { [ oslash, Oslash ], [ parenleft, braceleft ] };
key <AC11> { [ ae, AE ], [ parenright, braceright ] };
key <RTRN> { [ Return, Return ], [ Return, Return ] };
key <LFSH> { [ Shift_L, Shift_L ], [ Shift_L, Shift_L ] };
key <AB01> { [ z, Z ], [ comma, backslash ] };
key <AB02> { [ x, X ], [ quotedbl, slash ] };
key <AB03> { [ c, C ], [ quoteright, less ] };
key <AB04> { [ v, V ], [ colon, greater ] };
key <AB05> { [ b, B ], [ semicolon, equal ] };
key <AB06> { [ n, N ], [ exclam, bracketleft ] };
key <AB07> { [ m, M ], [ question, bracketright ] };
key <AB08> { [ period, period ], [ period, period ] };
key <I149> { [ preferences, preferences ], [ preferences, preferences ] };
key <SPCE> { [ space, space ], [ space, space ] };
key <BKSP> { [ BackSpace, BackSpace ], [ BackSpace, BackSpace ] };
};
xkb_types "squeekboard" {
type "TWO_LEVEL" {
modifiers = Shift;
map[Shift] = Level2;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
};
};
xkb_compatibility "squeekboard" {
};
};

View File

@ -0,0 +1,305 @@
xkb_keymap {
xkb_keycodes "squeekboard" {
minimum = 8;
maximum = 255;
<ESC> = 9;
<AE01> = 10;
<AE02> = 11;
<AE03> = 12;
<AE04> = 13;
<AE05> = 14;
<AE06> = 15;
<AE07> = 16;
<AE08> = 17;
<AE09> = 18;
<AE10> = 19;
<AE11> = 20;
<AE12> = 21;
<BKSP> = 22;
<TAB> = 23;
<AD01> = 24;
<AD02> = 25;
<AD03> = 26;
<AD04> = 27;
<AD05> = 28;
<AD06> = 29;
<AD07> = 30;
<AD08> = 31;
<AD09> = 32;
<AD10> = 33;
<AD11> = 34;
<AD12> = 35;
<RTRN> = 36;
<LCTL> = 37;
<AC01> = 38;
<AC02> = 39;
<AC03> = 40;
<AC04> = 41;
<AC05> = 42;
<AC06> = 43;
<AC07> = 44;
<AC08> = 45;
<AC09> = 46;
<AC10> = 47;
<AC11> = 48;
<TLDE> = 49;
<LFSH> = 50;
<BKSL> = 51;
<AB01> = 52;
<AB02> = 53;
<AB03> = 54;
<AB04> = 55;
<AB05> = 56;
<AB06> = 57;
<AB07> = 58;
<AB08> = 59;
<AB09> = 60;
<AB10> = 61;
<RTSH> = 62;
<KPMU> = 63;
<LALT> = 64;
<SPCE> = 65;
<CAPS> = 66;
<FK01> = 67;
<FK02> = 68;
<FK03> = 69;
<FK04> = 70;
<FK05> = 71;
<FK06> = 72;
<FK07> = 73;
<FK08> = 74;
<FK09> = 75;
<FK10> = 76;
<NMLK> = 77;
<SCLK> = 78;
<KP7> = 79;
<KP8> = 80;
<KP9> = 81;
<KPSU> = 82;
<KP4> = 83;
<KP5> = 84;
<KP6> = 85;
<KPAD> = 86;
<KP1> = 87;
<KP2> = 88;
<KP3> = 89;
<KP0> = 90;
<KPDL> = 91;
<LVL3> = 92;
<LSGT> = 94;
<FK11> = 95;
<FK12> = 96;
<AB11> = 97;
<KATA> = 98;
<HIRA> = 99;
<HENK> = 100;
<HKTG> = 101;
<MUHE> = 102;
<JPCM> = 103;
<KPEN> = 104;
<RCTL> = 105;
<KPDV> = 106;
<PRSC> = 107;
<RALT> = 108;
<LNFD> = 109;
<HOME> = 110;
<UP> = 111;
<PGUP> = 112;
<LEFT> = 113;
<RGHT> = 114;
<END> = 115;
<DOWN> = 116;
<PGDN> = 117;
<INS> = 118;
<DELE> = 119;
<I120> = 120;
<MUTE> = 121;
<VOL-> = 122;
<VOL+> = 123;
<POWR> = 124;
<KPEQ> = 125;
<I126> = 126;
<PAUS> = 127;
<I128> = 128;
<I129> = 129;
<HNGL> = 130;
<HJCV> = 131;
<AE13> = 132;
<LWIN> = 133;
<RWIN> = 134;
<COMP> = 135;
<STOP> = 136;
<AGAI> = 137;
<PROP> = 138;
<UNDO> = 139;
<FRNT> = 140;
<COPY> = 141;
<OPEN> = 142;
<PAST> = 143;
<FIND> = 144;
<CUT> = 145;
<HELP> = 146;
<I147> = 147;
<I148> = 148;
<I149> = 149;
<I150> = 150;
<I151> = 151;
<I152> = 152;
<I153> = 153;
<I154> = 154;
<I155> = 155;
<I156> = 156;
<I157> = 157;
<I158> = 158;
<I159> = 159;
<I160> = 160;
<I161> = 161;
<I162> = 162;
<I163> = 163;
<I164> = 164;
<I165> = 165;
<I166> = 166;
<I167> = 167;
<I168> = 168;
<I169> = 169;
<I170> = 170;
<I171> = 171;
<I172> = 172;
<I173> = 173;
<I174> = 174;
<I175> = 175;
<I176> = 176;
<I177> = 177;
<I178> = 178;
<I179> = 179;
<I180> = 180;
<I181> = 181;
<I182> = 182;
<I183> = 183;
<I184> = 184;
<I185> = 185;
<I186> = 186;
<I187> = 187;
<I188> = 188;
<I189> = 189;
<I190> = 190;
<FK13> = 191;
<FK14> = 192;
<FK15> = 193;
<FK16> = 194;
<FK17> = 195;
<FK18> = 196;
<FK19> = 197;
<FK20> = 198;
<FK21> = 199;
<FK22> = 200;
<FK23> = 201;
<FK24> = 202;
<MDSW> = 203;
<ALT> = 204;
<META> = 205;
<SUPR> = 206;
<HYPR> = 207;
<I208> = 208;
<I209> = 209;
<I210> = 210;
<I211> = 211;
<I212> = 212;
<I213> = 213;
<I214> = 214;
<I215> = 215;
<I216> = 216;
<I217> = 217;
<I218> = 218;
<I219> = 219;
<I220> = 220;
<I221> = 221;
<I222> = 222;
<I223> = 223;
<I224> = 224;
<I225> = 225;
<I226> = 226;
<I227> = 227;
<I228> = 228;
<I229> = 229;
<I230> = 230;
<I231> = 231;
<I232> = 232;
<I233> = 233;
<I234> = 234;
<I235> = 235;
<I236> = 236;
<I237> = 237;
<I238> = 238;
<I239> = 239;
<I240> = 240;
<I241> = 241;
<I242> = 242;
<I243> = 243;
<I244> = 244;
<I245> = 245;
<I246> = 246;
<I247> = 247;
<I248> = 248;
<I249> = 249;
<I250> = 250;
<I251> = 251;
<I252> = 252;
<I253> = 253;
<I254> = 254;
<I255> = 255;
};
xkb_symbols "squeekboard" {
name[Group1] = "Letters";
name[Group2] = "Numbers/Symbols";
key <AD01> { [ q, Q ], [ 1, asciitilde ] };
key <AD02> { [ w, W ], [ 2, quoteleft ] };
key <AD03> { [ e, E ], [ 3, bar ] };
key <AD04> { [ r, R ], [ 4, U00B7 ] };
key <AD05> { [ t, T ], [ 5, squareroot ] };
key <AD06> { [ y, Y ], [ 6, Greek_pi ] };
key <AD07> { [ u, U ], [ 7, division ] };
key <AD08> { [ i, I ], [ 8, multiply ] };
key <AD09> { [ o, O ], [ 9, paragraph ] };
key <AD10> { [ p, P ], [ 0, U25B3 ] };
key <AC01> { [ a, A ], [ at, copyright ] };
key <AC02> { [ s, S ], [ numbersign, U00AE ] };
key <AC03> { [ d, D ], [ dollar, U00A3 ] };
key <AC04> { [ f, F ], [ percent, EuroSign ] };
key <AC05> { [ g, G ], [ ampersand, U00A5 ] };
key <AC06> { [ h, H ], [ minus, underscore ] };
key <AC07> { [ j, J ], [ plus, equal ] };
key <AC08> { [ k, K ], [ U00FC, asciicircum ] };
key <AC09> { [ l, L ], [ U00F6, degree ] };
key <RTRN> { [ Return, Return ], [ Return, Return ] };
key <LFSH> { [ Shift_L, Shift_L ], [ Shift_L, Shift_L ] };
key <AB01> { [ z, Z ], [ comma, backslash ] };
key <AB02> { [ x, X ], [ quotedbl, slash ] };
key <AB03> { [ c, C ], [ quoteright, less ] };
key <AB04> { [ v, V ], [ colon, greater ] };
key <AB05> { [ b, B ], [ semicolon, equal ] };
key <AB06> { [ n, N ], [ exclam, bracketleft ] };
key <AB07> { [ m, M ], [ question, bracketright ] };
key <AB08> { [ period, period ], [ period, period ] };
key <I149> { [ preferences, preferences ], [ preferences, preferences ] };
key <SPCE> { [ space, space ], [ space, space ] };
key <BKSP> { [ BackSpace, BackSpace ], [ BackSpace, BackSpace ] };
};
xkb_types "squeekboard" {
type "TWO_LEVEL" {
modifiers = Shift;
map[Shift] = Level2;
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
};
};
xkb_compatibility "squeekboard" {
};
};

View File

@ -0,0 +1,204 @@
<?xml version='1.0' encoding='ASCII' standalone='yes'?>
<symbols version="0.90">
<key name="AD01">
<symbol label="q">q</symbol>
<symbol label="Q">Q</symbol>
<symbol label="1">1</symbol>
<symbol label="~">asciitilde</symbol>
</key>
<key name="AD02">
<symbol label="w">w</symbol>
<symbol label="W">W</symbol>
<symbol label="2">2</symbol>
<symbol label="`">quoteleft</symbol>
</key>
<key name="AD03">
<symbol label="e">e</symbol>
<symbol label="E">E</symbol>
<symbol label="3">3</symbol>
<symbol label="|">bar</symbol>
</key>
<key name="AD04">
<symbol label="r">r</symbol>
<symbol label="R">R</symbol>
<symbol label="4">4</symbol>
<symbol label="&#183;">U00B7</symbol>
</key>
<key name="AD05">
<symbol label="t">t</symbol>
<symbol label="T">T</symbol>
<symbol label="5">5</symbol>
<symbol label="&#8730;">squareroot</symbol>
</key>
<key name="AD06">
<symbol label="y">y</symbol>
<symbol label="Y">Y</symbol>
<symbol label="6">6</symbol>
<symbol label="&#960;">Greek_pi</symbol>
</key>
<key name="AD07">
<symbol label="u">u</symbol>
<symbol label="U">U</symbol>
<symbol label="7">7</symbol>
<symbol label="&#247;">division</symbol>
</key>
<key name="AD08">
<symbol label="i">i</symbol>
<symbol label="I">I</symbol>
<symbol label="8">8</symbol>
<symbol label="&#215;">multiply</symbol>
</key>
<key name="AD09">
<symbol label="o">o</symbol>
<symbol label="O">O</symbol>
<symbol label="9">9</symbol>
<symbol label="&#182;">paragraph</symbol>
</key>
<key name="AD10">
<symbol label="p">p</symbol>
<symbol label="P">P</symbol>
<symbol label="0">0</symbol>
<symbol label="&#9651;">U25B3</symbol>
</key>
<key name="AD11">
<symbol keyval="229" label="&#229;">aring</symbol>
<symbol keyval="197" label="&#197;">Aring</symbol>
<symbol label="&#177;">U00B1</symbol>
<symbol label="&#167;">U00A7</symbol>
</key>
<key name="AC01">
<symbol label="a">a</symbol>
<symbol label="A">A</symbol>
<symbol label="@">at</symbol>
<symbol label="&#169;">copyright</symbol>
</key>
<key name="AC02">
<symbol label="s">s</symbol>
<symbol label="S">S</symbol>
<symbol label="#">numbersign</symbol>
<symbol label="&#174;">U00AE</symbol>
</key>
<key name="AC03">
<symbol label="d">d</symbol>
<symbol label="D">D</symbol>
<symbol label="$">dollar</symbol>
<symbol label="&#163;">U00A3</symbol>
</key>
<key name="AC04">
<symbol label="f">f</symbol>
<symbol label="F">F</symbol>
<symbol label="%">percent</symbol>
<symbol label="&#8364;">EuroSign</symbol>
</key>
<key name="AC05">
<symbol label="g">g</symbol>
<symbol label="G">G</symbol>
<symbol label="&amp;">ampersand</symbol>
<symbol label="&#165;">U00A5</symbol>
</key>
<key name="AC06">
<symbol label="h">h</symbol>
<symbol label="H">H</symbol>
<symbol label="-">minus</symbol>
<symbol label="_">underscore</symbol>
</key>
<key name="AC07">
<symbol label="j">j</symbol>
<symbol label="J">J</symbol>
<symbol label="+">plus</symbol>
<symbol label="=">equal</symbol>
</key>
<key name="AC08">
<symbol label="k">k</symbol>
<symbol label="K">K</symbol>
<symbol label="&#252;">U00FC</symbol>
<symbol label="^">asciicircum</symbol>
</key>
<key name="AC09">
<symbol label="l">l</symbol>
<symbol label="L">L</symbol>
<symbol label="&#246;">U00F6</symbol>
<symbol label="&#176;">degree</symbol>
</key>
<key name="AC10">
<symbol keyval="248" label="&#248;">oslash</symbol>
<symbol keyval="216" label="&#216;">Oslash</symbol>
<symbol label="(">parenleft</symbol>
<symbol label="{">braceleft</symbol>
</key>
<key name="AC11">
<symbol keyval="230" label="&#230;">ae</symbol>
<symbol keyval="198" label="&#198;">AE</symbol>
<symbol label=")">parenright</symbol>
<symbol label="}">braceright</symbol>
</key>
<key name="RTRN">
<symbol keyval="65293" icon="key-enter">Return</symbol>
</key>
<key name="LFSH">
<keysym keyval="65505" icon="key-shift">Shift_L</keysym>
<keysym keyval="65505" icon="key-shift">Shift_L</keysym>
<keysym keyval="65505" label="=/+">Shift_L</keysym>
<keysym keyval="65505" label="123">Shift_L</keysym>
</key>
<key name="AB01">
<symbol label="z">z</symbol>
<symbol label="Z">Z</symbol>
<symbol label=",">comma</symbol>
<symbol label="\">backslash</symbol>
</key>
<key name="AB02">
<symbol label="x">x</symbol>
<symbol label="X">X</symbol>
<symbol label="&quot;">quotedbl</symbol>
<symbol label="/">slash</symbol>
</key>
<key name="AB03">
<symbol label="c">c</symbol>
<symbol label="C">C</symbol>
<symbol label="'">quoteright</symbol>
<symbol label="&lt;">less</symbol>
</key>
<key name="AB04">
<symbol label="v">v</symbol>
<symbol label="V">V</symbol>
<symbol label=":">colon</symbol>
<symbol label="&gt;">greater</symbol>
</key>
<key name="AB05">
<symbol label="b">b</symbol>
<symbol label="B">B</symbol>
<symbol label=";">semicolon</symbol>
<symbol label="=">equal</symbol>
</key>
<key name="AB06">
<symbol label="n">n</symbol>
<symbol label="N">N</symbol>
<symbol label="!">exclam</symbol>
<symbol label="[">bracketleft</symbol>
</key>
<key name="AB07">
<symbol label="m">m</symbol>
<symbol label="M">M</symbol>
<symbol label="?">question</symbol>
<symbol label="]">bracketright</symbol>
</key>
<key name="AB08">
<symbol label=".">period</symbol>
</key>
<key name="ABC123">
<symbol label="123">show-numbers</symbol>
<symbol label="123">show-numbers</symbol>
<symbol label="ABC">show-letters</symbol>
<symbol label="ABC">show-letters</symbol>
</key>
<key name="I149">
<symbol icon="keyboard-mode-symbolic" tooltip="Setup">preferences</symbol>
</key>
<key name="SPCE">
<symbol label=" ">space</symbol>
</key>
<key name="BKSP">
<symbol keyval="65288" icon="edit-clear-symbolic">BackSpace</symbol>
</key>
</symbols>

View File

@ -1,276 +1,186 @@
<?xml version="1.0"?> <?xml version='1.0' encoding='ASCII' standalone='yes'?>
<symbols version="0.90"> <symbols version="0.90">
<key keycode="9" name="ESC"> <key name="AD01">
<keysym keyval="65307">Escape</keysym> <symbol label="q">q</symbol>
<symbol label="Q">Q</symbol>
<symbol label="1">1</symbol>
<symbol label="~">asciitilde</symbol>
</key> </key>
<key keycode="67" name="FK01"> <key name="AD02">
<keysym keyval="65470">F1</keysym> <symbol label="w">w</symbol>
<symbol label="W">W</symbol>
<symbol label="2">2</symbol>
<symbol label="`">quoteleft</symbol>
</key> </key>
<key keycode="68" name="FK02"> <key name="AD03">
<keysym keyval="65471">F2</keysym> <symbol label="e">e</symbol>
<symbol label="E">E</symbol>
<symbol label="3">3</symbol>
<symbol label="|">bar</symbol>
</key> </key>
<key keycode="69" name="FK03"> <key name="AD04">
<keysym keyval="65472">F3</keysym> <symbol label="r">r</symbol>
<symbol label="R">R</symbol>
<symbol label="4">4</symbol>
<symbol label="&#183;">U00B7</symbol>
</key> </key>
<key keycode="70" name="FK04"> <key name="AD05">
<keysym keyval="65473">F4</keysym> <symbol label="t">t</symbol>
<symbol label="T">T</symbol>
<symbol label="5">5</symbol>
<symbol label="&#8730;">squareroot</symbol>
</key> </key>
<key keycode="71" name="FK05"> <key name="AD06">
<keysym keyval="65474">F5</keysym> <symbol label="y">y</symbol>
<symbol label="Y">Y</symbol>
<symbol label="6">6</symbol>
<symbol label="&#960;">Greek_pi</symbol>
</key> </key>
<key keycode="72" name="FK06"> <key name="AD07">
<keysym keyval="65475">F6</keysym> <symbol label="u">u</symbol>
<symbol label="U">U</symbol>
<symbol label="7">7</symbol>
<symbol label="&#247;">division</symbol>
</key> </key>
<key keycode="73" name="FK07"> <key name="AD08">
<keysym keyval="65476">F7</keysym> <symbol label="i">i</symbol>
<symbol label="I">I</symbol>
<symbol label="8">8</symbol>
<symbol label="&#215;">multiply</symbol>
</key> </key>
<key keycode="74" name="FK08"> <key name="AD09">
<keysym keyval="65477">F8</keysym> <symbol label="o">o</symbol>
<symbol label="O">O</symbol>
<symbol label="9">9</symbol>
<symbol label="&#182;">paragraph</symbol>
</key> </key>
<key keycode="75" name="FK09"> <key name="AD10">
<keysym keyval="65478">F9</keysym> <symbol label="p">p</symbol>
<symbol label="P">P</symbol>
<symbol label="0">0</symbol>
<symbol label="&#9651;">U25B3</symbol>
</key> </key>
<key keycode="76" name="FK10"> <key name="AC01">
<keysym keyval="65479">F10</keysym> <symbol label="a">a</symbol>
<symbol label="A">A</symbol>
<symbol label="@">at</symbol>
<symbol label="&#169;">copyright</symbol>
</key> </key>
<key keycode="95" name="FK11"> <key name="AC02">
<keysym keyval="65480">F11</keysym> <symbol label="s">s</symbol>
<symbol label="S">S</symbol>
<symbol label="#">numbersign</symbol>
<symbol label="&#174;">U00AE</symbol>
</key> </key>
<key keycode="96" name="FK12"> <key name="AC03">
<keysym keyval="65481">F12</keysym> <symbol label="d">d</symbol>
<symbol label="D">D</symbol>
<symbol label="$">dollar</symbol>
<symbol label="&#163;">U00A3</symbol>
</key> </key>
<key keycode="22" name="BKSP"> <key name="AC04">
<keysym keyval="65288" icon="edit-clear-symbolic">backspace</keysym> <symbol label="f">f</symbol>
<symbol label="F">F</symbol>
<symbol label="%">percent</symbol>
<symbol label="&#8364;">EuroSign</symbol>
</key> </key>
<key keycode="23" name="TAB"> <key name="AC05">
<keysym keyval="65289">Tab</keysym> <symbol label="g">g</symbol>
<keysym keyval="65056">ISO_Left_Tab</keysym> <symbol label="G">G</symbol>
<symbol label="&amp;">ampersand</symbol>
<symbol label="&#165;">U00A5</symbol>
</key> </key>
<key keycode="24" name="AD01"> <key name="AC06">
<keysym keyval="113">q</keysym> <symbol label="h">h</symbol>
<keysym keyval="81">Q</keysym> <symbol label="H">H</symbol>
<keysym keyval="49">1</keysym> <symbol label="-">minus</symbol>
<keysym keyval="126">asciitilde</keysym> <symbol label="_">underscore</symbol>
</key> </key>
<key keycode="25" name="AD02"> <key name="AC07">
<keysym keyval="119">w</keysym> <symbol label="j">j</symbol>
<keysym keyval="87">W</keysym> <symbol label="J">J</symbol>
<keysym keyval="50">2</keysym> <symbol label="+">plus</symbol>
<keysym keyval="96">quoteleft</keysym> <symbol label="=">equal</symbol>
</key> </key>
<key keycode="26" name="AD03"> <key name="AC08">
<keysym keyval="101">e</keysym> <symbol label="k">k</symbol>
<keysym keyval="69">E</keysym> <symbol label="K">K</symbol>
<keysym keyval="51">3</keysym> <symbol label="(">parenleft</symbol>
<keysym keyval="124">bar</keysym> <symbol label="{">braceleft</symbol>
</key> </key>
<key keycode="27" name="AD04"> <key name="AC09">
<keysym keyval="114">r</keysym> <symbol label="l">l</symbol>
<keysym keyval="82">R</keysym> <symbol label="L">L</symbol>
<keysym keyval="52">4</keysym> <symbol label=")">parenright</symbol>
<keysym keyval="183">middledot</keysym> <symbol label="}">braceright</symbol>
</key> </key>
<key keycode="28" name="AD05"> <key name="RTRN">
<keysym keyval="116">t</keysym> <symbol keyval="65293" icon="key-enter">Return</symbol>
<keysym keyval="84">T</keysym>
<keysym keyval="53">5</keysym>
</key> </key>
<key keycode="29" name="AD06"> <key name="LFSH">
<keysym keyval="121">y</keysym>
<keysym keyval="89">Y</keysym>
<keysym keyval="54">6</keysym>
</key>
<key keycode="30" name="AD07">
<keysym keyval="117">u</keysym>
<keysym keyval="85">U</keysym>
<keysym keyval="55">7</keysym>
</key>
<key keycode="31" name="AD08">
<keysym keyval="105">i</keysym>
<keysym keyval="73">I</keysym>
<keysym keyval="56">8</keysym>
</key>
<key keycode="32" name="AD09">
<keysym keyval="111">o</keysym>
<keysym keyval="79">O</keysym>
<keysym keyval="57">9</keysym>
</key>
<key keycode="33" name="AD10">
<keysym keyval="112">p</keysym>
<keysym keyval="80">P</keysym>
<keysym keyval="48">0</keysym>
</key>
<key keycode="34" name="AD11">
<keysym keyval="91">bracketleft</keysym>
<keysym keyval="123">braceleft</keysym>
</key>
<key keycode="35" name="AD12">
<keysym keyval="93">bracketright</keysym>
<keysym keyval="125">braceright</keysym>
</key>
<key keycode="51" name="BKSL">
<keysym keyval="92">backslash</keysym>
<keysym keyval="124">bar</keysym>
</key>
<key keycode="0" name="ABC123">
<symbol label="123">show-numbers</symbol>
<symbol label="123">show-numbers</symbol>
<symbol label="ABC">show-letters</symbol>
<symbol label="ABC">show-letters</symbol>
</key>
<key keycode="38" name="AC01">
<keysym keyval="97">a</keysym>
<keysym keyval="65">A</keysym>
<keysym keyval="64">at</keysym>
<keysym keyval="169">copyright</keysym>
</key>
<key keycode="39" name="AC02">
<keysym keyval="115">s</keysym>
<keysym keyval="83">S</keysym>
<keysym keyval="35">numbersign</keysym>
<keysym keyval="174">registeredtrademark</keysym>
</key>
<key keycode="40" name="AC03">
<keysym keyval="100">d</keysym>
<keysym keyval="68">D</keysym>
<keysym keyval="36">dollar</keysym>
<keysym keyval="163">poundsign</keysym>
</key>
<key keycode="41" name="AC04">
<keysym keyval="102">f</keysym>
<keysym keyval="70">F</keysym>
<keysym keyval="37">percent</keysym>
<text></text>
</key>
<key keycode="42" name="AC05">
<keysym keyval="103">g</keysym>
<keysym keyval="71">G</keysym>
<keysym keyval="38">ampersand</keysym>
<keysym keyval="165">yensign</keysym>
</key>
<key keycode="43" name="AC06">
<keysym keyval="104">h</keysym>
<keysym keyval="72">H</keysym>
<keysym keyval="45">minus</keysym>
<keysym keyval="94">asciicircum</keysym>
</key>
<key keycode="44" name="AC07">
<keysym keyval="106">j</keysym>
<keysym keyval="74">J</keysym>
<keysym keyval="43">plus</keysym>
<keysym keyval="176">degreesign</keysym>
</key>
<key keycode="45" name="AC08">
<keysym keyval="107">k</keysym>
<keysym keyval="75">K</keysym>
<keysym keyval="40">parenleft</keysym>
<keysym keyval="123">braceleft</keysym>
</key>
<key keycode="46" name="AC09">
<keysym keyval="108">l</keysym>
<keysym keyval="76">L</keysym>
<keysym keyval="41">parenright</keysym>
<keysym keyval="125">braceright</keysym>
</key>
<key keycode="47" name="AC10">
<keysym keyval="59">semicolon</keysym>
<keysym keyval="58">colon</keysym>
</key>
<key keycode="48" name="AC11">
<keysym keyval="39">quoteright</keysym>
<keysym keyval="34">quotedbl</keysym>
</key>
<key keycode="36" name="RTRN">
<keysym keyval="65293" icon="key-enter">Return</keysym>
</key>
<key keycode="50" name="LFSH">
<keysym keyval="65505" icon="key-shift">Shift_L</keysym> <keysym keyval="65505" icon="key-shift">Shift_L</keysym>
<keysym keyval="65505" icon="key-shift">Shift_L</keysym> <keysym keyval="65505" icon="key-shift">Shift_L</keysym>
<keysym keyval="65505" label="=/+">Shift_L</keysym> <keysym keyval="65505" label="=/+">Shift_L</keysym>
<keysym keyval="65505" label="123">Shift_L</keysym> <keysym keyval="65505" label="123">Shift_L</keysym>
</key> </key>
<key keycode="52" name="AB01"> <key name="AB01">
<keysym keyval="122">z</keysym> <symbol label="z">z</symbol>
<keysym keyval="90">Z</keysym> <symbol label="Z">Z</symbol>
<keysym keyval="44">comma</keysym> <symbol label=",">comma</symbol>
<keysym keyval="92">backslash</keysym> <symbol label="\">backslash</symbol>
</key> </key>
<key keycode="53" name="AB02"> <key name="AB02">
<keysym keyval="120">x</keysym> <symbol label="x">x</symbol>
<keysym keyval="88">X</keysym> <symbol label="X">X</symbol>
<keysym keyval="34">quotedbl</keysym> <symbol label="&quot;">quotedbl</symbol>
<keysym keyval="47">slash</keysym> <symbol label="/">slash</symbol>
</key> </key>
<key keycode="54" name="AB03"> <key name="AB03">
<keysym keyval="99">c</keysym> <symbol label="c">c</symbol>
<keysym keyval="67">C</keysym> <symbol label="C">C</symbol>
<keysym keyval="39">quoteright</keysym> <symbol label="'">quoteright</symbol>
<keysym keyval="60">less</keysym> <symbol label="&lt;">less</symbol>
</key> </key>
<key keycode="55" name="AB04"> <key name="AB04">
<keysym keyval="118">v</keysym> <symbol label="v">v</symbol>
<keysym keyval="86">V</keysym> <symbol label="V">V</symbol>
<keysym keyval="58">colon</keysym> <symbol label=":">colon</symbol>
<keysym keyval="62">greater</keysym> <symbol label="&gt;">greater</symbol>
</key> </key>
<key keycode="56" name="AB05"> <key name="AB05">
<keysym keyval="98">b</keysym> <symbol label="b">b</symbol>
<keysym keyval="66">B</keysym> <symbol label="B">B</symbol>
<keysym keyval="59">semicolon</keysym> <symbol label=";">semicolon</symbol>
<keysym keyval="61">equal</keysym> <symbol label="=">equal</symbol>
</key> </key>
<key keycode="57" name="AB06"> <key name="AB06">
<keysym keyval="110">n</keysym> <symbol label="n">n</symbol>
<keysym keyval="78">N</keysym> <symbol label="N">N</symbol>
<keysym keyval="33">exclam</keysym> <symbol label="!">exclam</symbol>
<keysym keyval="91">bracketleft</keysym> <symbol label="[">bracketleft</symbol>
</key> </key>
<key keycode="58" name="AB07"> <key name="AB07">
<keysym keyval="109">m</keysym> <symbol label="m">m</symbol>
<keysym keyval="77">M</keysym> <symbol label="M">M</symbol>
<keysym keyval="63">question</keysym> <symbol label="?">question</symbol>
<keysym keyval="93">bracketright</keysym> <symbol label="]">bracketright</symbol>
</key> </key>
<key keycode="59" name="AB08"> <key name="AB08">
<keysym keyval="44">comma</keysym> <symbol label=".">period</symbol>
<keysym keyval="60">less</keysym>
</key> </key>
<key keycode="60" name="AB09"> <key name="ABC123">
<keysym keyval="46">period</keysym> <symbol label="123">show-numbers</symbol>
<symbol label="123">show-numbers</symbol>
<symbol label="ABC">show-letters</symbol>
<symbol label="ABC">show-letters</symbol>
</key> </key>
<key keycode="61" name="AB10"> <key name="I149">
<keysym keyval="47">slash</keysym> <symbol label="&#9786;" icon="keyboard-mode-symbolic" tooltip="Setup">preferences</symbol>
<keysym keyval="63">question</keysym>
</key> </key>
<key keycode="62" name="RTSH"> <key name="SPCE">
<keysym keyval="65506">Shift_R</keysym> <symbol label=" ">space</symbol>
</key> </key>
<key keycode="149" name="I149"> <key name="BKSP">
<symbol label="⌨" icon="input-keyboard-symbolic" tooltip="Change keyboard">cycle-keyboard</symbol> <symbol keyval="65288" icon="edit-clear-symbolic">backspace</symbol>
</key>
<key keycode="150" name="I150">
<symbol label="☺" icon="keyboard-mode-symbolic" tooltip="Setup">preferences</symbol>
</key>
<key keycode="37" name="LCTL">
<keysym keyval="65507">Control_L</keysym>
</key>
<key keycode="64" name="LALT">
<keysym keyval="65513">Alt_L</keysym>
<keysym keyval="65511">Meta_L</keysym>
</key>
<key keycode="65" name="SPCE">
<keysym keyval="32">space</keysym>
</key>
<key keycode="113" name="LEFT">
<keysym keyval="65361">Left</keysym>
</key>
<key keycode="111" name="UP">
<keysym keyval="65362">Up</keysym>
</key>
<key keycode="116" name="DOWN">
<keysym keyval="65364">Down</keysym>
</key>
<key keycode="114" name="RGHT">
<keysym keyval="65363">Right</keysym>
</key> </key>
</symbols> </symbols>

View File

@ -3,7 +3,10 @@
<gresource prefix="/sm/puri/squeekboard"> <gresource prefix="/sm/puri/squeekboard">
<file compressed="true">style.css</file> <file compressed="true">style.css</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/geometry/compact.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/geometry/compact.xml</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/geometry/extended.xml</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/keyboards.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/keyboards.xml</file>
<file compressed="true">keyboards/keymaps/nb.xkb</file>
<file compressed="true">keyboards/keymaps/us.xkb</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ar.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ar.xml</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/as-inscript.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/as-inscript.xml</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/be.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/be.xml</file>
@ -21,6 +24,7 @@
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ml-inscript.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ml-inscript.xml</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/mr-inscript.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/mr-inscript.xml</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/my.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/my.xml</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/nb.xml</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/or-inscript.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/or-inscript.xml</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/pa-inscript.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/pa-inscript.xml</file>
<file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ru.xml</file> <file compressed="true" preprocess="xml-stripblanks">keyboards/symbols/ru.xml</file>

View File

@ -72,7 +72,7 @@ struct _EekKeyboardPrivate
GList *pressed_keys; GList *pressed_keys;
GList *locked_keys; GList *locked_keys;
GArray *outline_array; GArray *outline_array;
GHashTable *keycodes; GHashTable *names;
/* modifiers dynamically assigned at run time */ /* modifiers dynamically assigned at run time */
EekModifierType num_lock_mask; EekModifierType num_lock_mask;
@ -127,9 +127,9 @@ section_child_added_cb (EekContainer *container,
EekElement *element, EekElement *element,
EekKeyboard *keyboard) EekKeyboard *keyboard)
{ {
guint keycode = eek_key_get_keycode (EEK_KEY(element)); const gchar *name = eek_element_get_name(element);
g_hash_table_insert (keyboard->priv->keycodes, g_hash_table_insert (keyboard->priv->names,
GUINT_TO_POINTER(keycode), (gpointer)name,
element); element);
} }
@ -138,9 +138,9 @@ section_child_removed_cb (EekContainer *container,
EekElement *element, EekElement *element,
EekKeyboard *keyboard) EekKeyboard *keyboard)
{ {
guint keycode = eek_key_get_keycode (EEK_KEY(element)); const gchar *name = eek_element_get_name(element);
g_hash_table_remove (keyboard->priv->keycodes, g_hash_table_remove (keyboard->priv->names,
GUINT_TO_POINTER(keycode)); name);
} }
static EekSection * static EekSection *
@ -219,7 +219,7 @@ set_level_from_modifiers (EekKeyboard *self, EekKey *key)
gint level = priv->old_level & 2; gint level = priv->old_level & 2;
/* Handle non-emitting keys */ /* Handle non-emitting keys */
if (key && (eek_key_get_keycode(key) == 0)) { if (key) {
const gchar *name = eek_element_get_name(EEK_ELEMENT(key)); const gchar *name = eek_element_get_name(EEK_ELEMENT(key));
if (g_strcmp0(name, "ABC123") == 0) if (g_strcmp0(name, "ABC123") == 0)
level ^= 2; level ^= 2;
@ -400,7 +400,7 @@ eek_keyboard_finalize (GObject *object)
g_list_free_full (priv->locked_keys, g_list_free_full (priv->locked_keys,
(GDestroyNotify) eek_modifier_key_free); (GDestroyNotify) eek_modifier_key_free);
g_hash_table_destroy (priv->keycodes); g_hash_table_destroy (priv->names);
for (i = 0; i < priv->outline_array->len; i++) { for (i = 0; i < priv->outline_array->len; i++) {
EekOutline *outline = &g_array_index (priv->outline_array, EekOutline *outline = &g_array_index (priv->outline_array,
@ -528,7 +528,7 @@ eek_keyboard_init (EekKeyboard *self)
self->priv = EEK_KEYBOARD_GET_PRIVATE(self); self->priv = EEK_KEYBOARD_GET_PRIVATE(self);
self->priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_NONE; self->priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_NONE;
self->priv->outline_array = g_array_new (FALSE, TRUE, sizeof (EekOutline)); self->priv->outline_array = g_array_new (FALSE, TRUE, sizeof (EekOutline));
self->priv->keycodes = g_hash_table_new (g_direct_hash, g_direct_equal); self->priv->names = g_hash_table_new (g_str_hash, g_str_equal);
eek_element_set_symbol_index (EEK_ELEMENT(self), 0, 0); eek_element_set_symbol_index (EEK_ELEMENT(self), 0, 0);
self->scale = 1.0; self->scale = 1.0;
} }
@ -549,20 +549,20 @@ eek_keyboard_create_section (EekKeyboard *keyboard)
} }
/** /**
* eek_keyboard_find_key_by_keycode: * eek_keyboard_find_key_by_name:
* @keyboard: an #EekKeyboard * @keyboard: an #EekKeyboard
* @keycode: a keycode * @name: a key name
* *
* Find an #EekKey whose keycode is @keycode. * Find an #EekKey whose name is @name.
* Return value: (transfer none): #EekKey whose keycode is @keycode * Return value: (transfer none): #EekKey whose name is @name
*/ */
EekKey * EekKey *
eek_keyboard_find_key_by_keycode (EekKeyboard *keyboard, eek_keyboard_find_key_by_name (EekKeyboard *keyboard,
guint keycode) const gchar *name)
{ {
g_return_val_if_fail (EEK_IS_KEYBOARD(keyboard), NULL); g_return_val_if_fail (EEK_IS_KEYBOARD(keyboard), NULL);
return g_hash_table_lookup (keyboard->priv->keycodes, return g_hash_table_lookup (keyboard->priv->names,
GUINT_TO_POINTER(keycode)); name);
} }
/** /**

View File

@ -70,8 +70,8 @@ struct _EekKeyboard
/** /**
* EekKeyboardClass: * EekKeyboardClass:
* @create_section: virtual function for creating a section * @create_section: virtual function for creating a section
* @find_key_by_keycode: virtual function for finding a key in the * @find_key_by_name: virtual function for finding a key in the
* keyboard by keycode * keyboard by name
* @key_pressed: class handler for #EekKeyboard::key-pressed signal * @key_pressed: class handler for #EekKeyboard::key-pressed signal
* @key_released: class handler for #EekKeyboard::key-released signal * @key_released: class handler for #EekKeyboard::key-released signal
* @key_locked: class handler for #EekKeyboard::key-locked signal * @key_locked: class handler for #EekKeyboard::key-locked signal
@ -90,8 +90,8 @@ struct _EekKeyboardClass
/*< public >*/ /*< public >*/
EekSection *(* create_section) (EekKeyboard *self); EekSection *(* create_section) (EekKeyboard *self);
EekKey *(* find_key_by_keycode) (EekKeyboard *self, EekKey *(* find_key_by_name) (EekKeyboard *self,
guint keycode); const gchar *name);
/*< private >*/ /*< private >*/
/* obsolete members moved to EekElement */ /* obsolete members moved to EekElement */
@ -156,9 +156,9 @@ EekModifierType eek_keyboard_get_modifiers
EekSection *eek_keyboard_create_section EekSection *eek_keyboard_create_section
(EekKeyboard *keyboard); (EekKeyboard *keyboard);
EekKey *eek_keyboard_find_key_by_keycode EekKey *eek_keyboard_find_key_by_name
(EekKeyboard *keyboard, (EekKeyboard *keyboard,
guint keycode); const gchar *name);
guint eek_keyboard_add_outline guint eek_keyboard_add_outline
(EekKeyboard *keyboard, (EekKeyboard *keyboard,

View File

@ -122,7 +122,8 @@ on_unlocked (EekKey *key,
static EekKey * static EekKey *
eek_section_real_create_key (EekSection *self, eek_section_real_create_key (EekSection *self,
guint keycode, const gchar *name,
gint keycode,
gint column_index, gint column_index,
gint row_index) gint row_index)
{ {
@ -140,6 +141,7 @@ eek_section_real_create_key (EekSection *self,
row->num_columns = column_index + 1; row->num_columns = column_index + 1;
key = g_object_new (EEK_TYPE_KEY, key = g_object_new (EEK_TYPE_KEY,
"name", name,
"keycode", keycode, "keycode", keycode,
"column", column_index, "column", column_index,
"row", row_index, "row", row_index,
@ -461,6 +463,7 @@ eek_section_get_row (EekSection *section,
/** /**
* eek_section_create_key: * eek_section_create_key:
* @section: an #EekSection * @section: an #EekSection
* @name: a name
* @keycode: a keycode * @keycode: a keycode
* @column: the column index of the key * @column: the column index of the key
* @row: the row index of the key * @row: the row index of the key
@ -471,12 +474,14 @@ eek_section_get_row (EekSection *section,
*/ */
EekKey * EekKey *
eek_section_create_key (EekSection *section, eek_section_create_key (EekSection *section,
guint keycode, const gchar *name,
gint keycode,
gint column, gint column,
gint row) gint row)
{ {
g_return_val_if_fail (EEK_IS_SECTION(section), NULL); g_return_val_if_fail (EEK_IS_SECTION(section), NULL);
return EEK_SECTION_GET_CLASS(section)->create_key (section, return EEK_SECTION_GET_CLASS(section)->create_key (section,
name,
keycode, keycode,
column, column,
row); row);

View File

@ -62,7 +62,8 @@ struct _EekSectionClass
EekOrientation *orientation); EekOrientation *orientation);
EekKey *(* create_key) (EekSection *self, EekKey *(* create_key) (EekSection *self,
guint keycode, const gchar *name,
gint keycode,
gint row, gint row,
gint column); gint column);
@ -99,7 +100,8 @@ void eek_section_get_row (EekSection *section,
EekOrientation *orientation); EekOrientation *orientation);
EekKey *eek_section_create_key (EekSection *section, EekKey *eek_section_create_key (EekSection *section,
guint keycode, const gchar *name,
gint keycode,
gint column, gint column,
gint row); gint row);

View File

@ -405,17 +405,23 @@ geometry_start_element_callback (GMarkupParseContext *pcontext,
"no \"keycode\" attribute for \"key\""); "no \"keycode\" attribute for \"key\"");
return; return;
} }
keycode = strtoul (attribute, NULL, 10); keycode = strtol (attribute, NULL, 10);
data->key = eek_section_create_key (data->section,
keycode,
data->num_columns,
data->num_rows - 1);
attribute = get_attribute (attribute_names, attribute_values, attribute = get_attribute (attribute_names, attribute_values,
"name"); "name");
if (attribute != NULL) if (attribute == NULL) {
eek_element_set_name (EEK_ELEMENT(data->key), attribute); g_set_error (error,
G_MARKUP_ERROR,
G_MARKUP_ERROR_MISSING_ATTRIBUTE,
"no \"name\" attribute for \"key\"");
return;
}
data->key = eek_section_create_key (data->section,
g_strdup (attribute),
keycode,
data->num_columns,
data->num_rows - 1);
attribute = get_attribute (attribute_names, attribute_values, attribute = get_attribute (attribute_names, attribute_values,
"oref"); "oref");
@ -620,28 +626,25 @@ symbols_start_element_callback (GMarkupParseContext *pcontext,
return; return;
if (g_strcmp0 (element_name, "key") == 0) { if (g_strcmp0 (element_name, "key") == 0) {
guint keycode;
attribute = get_attribute (attribute_names, attribute_values, attribute = get_attribute (attribute_names, attribute_values,
"keycode"); "name");
if (attribute == NULL) { if (attribute == NULL) {
g_set_error (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR,
G_MARKUP_ERROR_MISSING_ATTRIBUTE, G_MARKUP_ERROR_MISSING_ATTRIBUTE,
"no \"keycode\" attribute for \"key\""); "no \"name\" attribute for \"key\"");
return; return;
} }
keycode = strtoul (attribute, NULL, 10);
data->key = eek_keyboard_find_key_by_keycode (data->keyboard, data->key = eek_keyboard_find_key_by_name (data->keyboard,
keycode); attribute);
/*if (data->key == NULL) { if (data->key == NULL) {
g_set_error (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR,
G_MARKUP_ERROR_INVALID_CONTENT, G_MARKUP_ERROR_INVALID_CONTENT,
"no such keycode %u", keycode); "no such key %s", attribute);
return; }
}*/
attribute = get_attribute (attribute_names, attribute_values, attribute = get_attribute (attribute_names, attribute_values,
"groups"); "groups");

View File

@ -28,6 +28,7 @@
#include "config.h" #include "config.h"
#include "eekboard/eekboard-context-service.h" #include "eekboard/eekboard-context-service.h"
#include "keymap.h"
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
@ -83,6 +84,53 @@ struct _EekboardContextServicePrivate {
G_DEFINE_TYPE_WITH_PRIVATE (EekboardContextService, eekboard_context_service, G_TYPE_OBJECT); G_DEFINE_TYPE_WITH_PRIVATE (EekboardContextService, eekboard_context_service, G_TYPE_OBJECT);
/*static Display *display = NULL; */ /*static Display *display = NULL; */
gchar *
get_keymap_from_resource(const gchar *keyboard_type, gboolean fallback)
{
g_autoptr (GFile) file = NULL;
g_autoptr (GFileInfo) info = NULL;
g_autoptr (GFileInputStream) stream = NULL;
goffset size = 0;
gsize bytes_read = 0;
g_autofree gchar *contents = NULL;
g_autofree gchar *path = NULL;
GError *error = NULL;
if (fallback)
g_debug ("falling back to loading a %s keymap", keyboard_type);
path = g_strconcat ("resource:///sm/puri/squeekboard/keyboards/keymaps/",
keyboard_type, ".xkb", NULL);
file = g_file_new_for_uri (path);
stream = g_file_read (file, NULL, &error);
if (!stream)
goto keymap_error;
info = g_file_input_stream_query_info (stream,
G_FILE_ATTRIBUTE_STANDARD_SIZE,
NULL,
&error);
if (!info)
goto keymap_error;
size = g_file_info_get_size (info);
contents = g_malloc0 (size);
if (!g_input_stream_read_all (G_INPUT_STREAM(stream), contents, size,
&bytes_read, NULL, &error))
goto keymap_error;
return g_utf8_make_valid (contents, -1);
keymap_error:
if (fallback)
g_error ("failed to load keymap from resource: %s", error->message);
g_error_free (error);
return NULL;
}
static EekKeyboard * static EekKeyboard *
eekboard_context_service_real_create_keyboard (EekboardContextService *self, eekboard_context_service_real_create_keyboard (EekboardContextService *self,
@ -143,18 +191,28 @@ eekboard_context_service_real_create_keyboard (EekboardContextService *self,
if (!context) { if (!context) {
g_error("No context created"); g_error("No context created");
} }
/*
struct xkb_rule_names rules = { 0 }; struct xkb_rule_names rules = { 0 };
rules.layout = strdup(keyboard_type); rules.layout = strdup(keyboard_type);
struct xkb_keymap *keymap = xkb_keymap_new_from_names(context, &rules, */
XKB_KEYMAP_COMPILE_NO_FLAGS); char *keymap_str = get_keymap_from_resource(keyboard_type, FALSE);
if (!keymap_str)
keymap_str = get_keymap_from_resource("us", TRUE);
struct xkb_keymap *keymap = xkb_keymap_new_from_string(context, keymap_str,
XKB_KEYMAP_FORMAT_TEXT_V1, XKB_KEYMAP_COMPILE_NO_FLAGS);
free(keymap_str);
xkb_context_unref(context); xkb_context_unref(context);
if (!keymap) { if (!keymap) {
g_error("Bad keymap"); g_error("Bad keymap");
} }
keyboard->keymap = keymap; keyboard->keymap = keymap;
char *keymap_str = xkb_keymap_get_as_string(keymap, XKB_KEYMAP_FORMAT_TEXT_V1);
keymap_str = xkb_keymap_get_as_string(keymap, XKB_KEYMAP_FORMAT_TEXT_V1);
keyboard->keymap_len = strlen(keymap_str) + 1; keyboard->keymap_len = strlen(keymap_str) + 1;
g_autofree char *path = strdup("/eek_keymap-XXXXXX"); g_autofree char *path = strdup("/eek_keymap-XXXXXX");
char *r = &path[strlen(path) - 6]; char *r = &path[strlen(path) - 6];
getrandom(r, 6, GRND_NONBLOCK); getrandom(r, 6, GRND_NONBLOCK);
@ -287,6 +345,7 @@ settings_update_layout(EekboardContextService *context)
g_autofree gchar *keyboard_type = NULL; g_autofree gchar *keyboard_type = NULL;
g_autofree gchar *keyboard_layout = NULL; g_autofree gchar *keyboard_layout = NULL;
settings_get_layout(context->priv->settings, &keyboard_type, &keyboard_layout); settings_get_layout(context->priv->settings, &keyboard_type, &keyboard_layout);
g_debug("type=%s, layout=%s", keyboard_type, keyboard_layout);
if (!keyboard_type) { if (!keyboard_type) {
keyboard_type = g_strdup("us"); keyboard_type = g_strdup("us");

View File

@ -143,8 +143,8 @@ int send_virtual_keyboard_key(
static void static void
send_fake_modifiers_events (SeatEmitter *emitter, send_fake_modifiers_events (SeatEmitter *emitter,
EekModifierType modifiers, EekModifierType modifiers,
uint32_t timestamp) uint32_t timestamp)
{ {
(void)timestamp; (void)timestamp;
@ -284,6 +284,26 @@ update_modifier_info (SeatEmitter *client)
}*/ }*/
} }
static void
send_fake_key (SeatEmitter *emitter,
EekKeyboard *keyboard,
guint keycode,
guint keyboard_modifiers,
gboolean pressed,
uint32_t timestamp)
{
uint32_t proto_modifiers = 0;
guint level = eek_element_get_level(EEK_ELEMENT(keyboard));
uint32_t group = (level / 2);
if (keyboard_modifiers & EEK_SHIFT_MASK)
proto_modifiers |= 1<<MOD_IDX_SHIFT;
zwp_virtual_keyboard_v1_modifiers(emitter->virtual_keyboard, proto_modifiers, 0, 0, group);
send_virtual_keyboard_key (emitter->virtual_keyboard, keycode - 8, (unsigned)pressed, timestamp);
zwp_virtual_keyboard_v1_modifiers(emitter->virtual_keyboard, proto_modifiers, 0, 0, group);
}
void void
emit_key_activated (EekboardContextService *manager, emit_key_activated (EekboardContextService *manager,
EekKeyboard *keyboard, EekKeyboard *keyboard,
@ -324,5 +344,5 @@ emit_key_activated (EekboardContextService *manager,
emitter.virtual_keyboard = manager->virtual_keyboard; emitter.virtual_keyboard = manager->virtual_keyboard;
emitter.keymap = keyboard->keymap; emitter.keymap = keyboard->keymap;
update_modifier_info (&emitter); update_modifier_info (&emitter);
send_fake_key_events (&emitter, symbol, modifiers, pressed, timestamp); send_fake_key (&emitter, keyboard, keycode, modifiers, pressed, timestamp);
} }