From 4e11d071d9a16efbb1b1d2928921dd71fddc172a Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 15 Jul 2019 21:02:52 +0200 Subject: [PATCH] Add a keymap for the US layout, update the US symbols --- data/keyboards/geometry/compact.xml | 66 +++--- data/keyboards/keymaps/us.xkb | 305 ++++++++++++++++++++++++++++ data/keyboards/symbols/us.xml | 216 ++++++++++---------- data/squeekboard.gresources.xml | 1 + 4 files changed, 450 insertions(+), 138 deletions(-) create mode 100644 data/keyboards/keymaps/us.xkb diff --git a/data/keyboards/geometry/compact.xml b/data/keyboards/geometry/compact.xml index f8dc5afe..141aafe7 100644 --- a/data/keyboards/geometry/compact.xml +++ b/data/keyboards/geometry/compact.xml @@ -3,51 +3,51 @@
- - - - - - - - - - + + + + + + + + + +
- - - - - - - - - + + + + + + + + +
- - - - - - - - - + + + + + + + + +
- - - - - + + + + +
diff --git a/data/keyboards/keymaps/us.xkb b/data/keyboards/keymaps/us.xkb new file mode 100644 index 00000000..44efcbb7 --- /dev/null +++ b/data/keyboards/keymaps/us.xkb @@ -0,0 +1,305 @@ +xkb_keymap { + + xkb_keycodes "squeekboard" { + minimum = 8; + maximum = 255; + = 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; + = 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; + = 180; + = 181; + = 182; + = 183; + = 184; + = 185; + = 186; + = 187; + = 188; + = 189; + = 190; + = 191; + = 192; + = 193; + = 194; + = 195; + = 196; + = 197; + = 198; + = 199; + = 200; + = 201; + = 202; + = 203; + = 204; + = 205; + = 206; + = 207; + = 208; + = 209; + = 210; + = 211; + = 212; + = 213; + = 214; + = 215; + = 216; + = 217; + = 218; + = 219; + = 220; + = 221; + = 222; + = 223; + = 224; + = 225; + = 226; + = 227; + = 228; + = 229; + = 230; + = 231; + = 232; + = 233; + = 234; + = 235; + = 236; + = 237; + = 238; + = 239; + = 240; + = 241; + = 242; + = 243; + = 244; + = 245; + = 246; + = 247; + = 248; + = 249; + = 250; + = 251; + = 252; + = 253; + = 254; + = 255; + }; + + xkb_symbols "squeekboard" { + + name[Group1] = "Letters"; + name[Group2] = "Numbers/Symbols"; + + key { [ q, Q ], [ 1, asciitilde ] }; + key { [ w, W ], [ 2, quoteleft ] }; + key { [ e, E ], [ 3, bar ] }; + key { [ r, R ], [ 4, U00B7 ] }; + key { [ t, T ], [ 5, squareroot ] }; + key { [ y, Y ], [ 6, Greek_pi ] }; + key { [ u, U ], [ 7, division ] }; + key { [ i, I ], [ 8, multiply ] }; + key { [ o, O ], [ 9, paragraph ] }; + key { [ p, P ], [ 0, U25B3 ] }; + key { [ a, A ], [ at, copyright ] }; + key { [ s, S ], [ numbersign, U00AE ] }; + key { [ d, D ], [ dollar, U00A3 ] }; + key { [ f, F ], [ percent, EuroSign ] }; + key { [ g, G ], [ ampersand, U00A5 ] }; + key { [ h, H ], [ minus, underscore ] }; + key { [ j, J ], [ plus, equal ] }; + key { [ k, K ], [ U00FC, asciicircum ] }; + key { [ l, L ], [ U00F6, degree ] }; + key { [ Return, Return ], [ Return, Return ] }; + key { [ Shift_L, Shift_L ], [ Shift_L, Shift_L ] }; + key { [ z, Z ], [ comma, backslash ] }; + key { [ x, X ], [ quotedbl, slash ] }; + key { [ c, C ], [ quoteright, less ] }; + key { [ v, V ], [ colon, greater ] }; + key { [ b, B ], [ semicolon, equal ] }; + key { [ n, N ], [ exclam, bracketleft ] }; + key { [ m, M ], [ question, bracketright ] }; + key { [ period, period ], [ period, period ] }; + key { [ preferences, preferences ], [ preferences, preferences ] }; + key { [ space, space ], [ space, space ] }; + key { [ 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" { + }; +}; diff --git a/data/keyboards/symbols/us.xml b/data/keyboards/symbols/us.xml index 66d8f0ba..047e968d 100644 --- a/data/keyboards/symbols/us.xml +++ b/data/keyboards/symbols/us.xml @@ -1,115 +1,121 @@ - + - q - Q - 1 - asciitilde + q + Q + 1 + asciitilde - w - W - 2 - quoteleft + w + W + 2 + quoteleft - e - E - 3 - bar + e + E + 3 + bar - r - R - 4 - middledot + r + R + 4 + U00B7 - t - T - 5 + t + T + 5 + squareroot - y - Y - 6 + y + Y + 6 + Greek_pi - u - U - 7 + u + U + 7 + division - i - I - 8 + i + I + 8 + multiply - o - O - 9 + o + O + 9 + paragraph - p - P - 0 + p + P + 0 + U25B3 - a - A - at - copyright + a + A + at + copyright - s - S - numbersign - registeredtrademark + s + S + numbersign + U00AE - d - D - dollar - poundsign + d + D + dollar + U00A3 - f - F - percent - + f + F + percent + EuroSign - g - G - ampersand - yensign + g + G + ampersand + U00A5 - h - H - minus - asciicircum + h + H + minus + underscore - j - J - plus - degreesign + j + J + plus + equal - k - K - parenleft - braceleft + k + K + parenleft + braceleft - l - L - parenright - braceright + l + L + parenright + braceright - Return + Return Shift_L @@ -118,49 +124,49 @@ Shift_L - z - Z - comma - backslash + z + Z + comma + backslash - x - X - quotedbl - slash + x + X + quotedbl + slash - c - C - quoteright - less + c + C + quoteright + less - v - V - colon - greater + v + V + colon + greater - b - B - semicolon - equal + b + B + semicolon + equal - n - N - exclam - bracketleft + n + N + exclam + bracketleft - m - M - question - bracketright + m + M + question + bracketright - period + period show-numbers @@ -168,13 +174,13 @@ show-letters show-letters - - preferences + + preferences - space + space - backspace + backspace diff --git a/data/squeekboard.gresources.xml b/data/squeekboard.gresources.xml index 60bc29fb..b53dc6a1 100644 --- a/data/squeekboard.gresources.xml +++ b/data/squeekboard.gresources.xml @@ -6,6 +6,7 @@ keyboards/geometry/extended.xml keyboards/keyboards.xml keyboards/keymaps/nb.xkb + keyboards/keymaps/us.xkb keyboards/symbols/ar.xml keyboards/symbols/as-inscript.xml keyboards/symbols/be.xml