Fix double-space period, shift double-tap; settings; letters from system keymap

- Double-space replaced the space via a Backspace keysym, which clients
  apply after the commit: use delete_surrounding_text with the commit
- Tests use a shared FakeEngine that applies ops to a simulated field
- Double-tap shift locks at a sentence start; typing between taps doesn't
- Organization name set: config lives in ~/.config/sloposk/
- Settings (auto-capitalization, double-space period) with a ⚙ panel
- Letter rows come from the compositor's XKB keymap; other letters of the
  layout become long-press alternates; globe switches the system layout
  over org.kde.keyboard
- One JSON template for non-letter layers; stretch keys even out rows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 20:28:39 +02:00
co-authored by Claude Opus 5.5
parent c6c977eb4c
commit 5277ab16ff
49 changed files with 1162 additions and 359 deletions
-62
View File
@@ -1,62 +0,0 @@
{
"id": "sv-SE",
"name": "Svenska",
"locale": "sv_SE",
"base": "en-US",
"layers": [
{
"name": "letters",
"rows": [
[
{"label": "q", "flick": "1"},
{"label": "w", "flick": "2"},
{"label": "e", "flick": "3", "alternates": ["é", "è", "ê", "ë"]},
{"label": "r", "flick": "4"},
{"label": "t", "flick": "5"},
{"label": "y", "flick": "6", "alternates": ["ý", "ü"]},
{"label": "u", "flick": "7", "alternates": ["ü", "ú", "ù", "û"]},
{"label": "i", "flick": "8", "alternates": ["í", "ì", "î", "ï"]},
{"label": "o", "flick": "9", "alternates": ["ó", "ò", "ô", "õ", "ø", "œ"]},
{"label": "p", "flick": "0"},
{"label": "å", "flick": "^"},
{"type": "backspace", "width": 1.5}
],
[
{"label": "a", "flick": "@", "alternates": ["á", "à", "â", "ã", "æ"]},
{"label": "s", "flick": "#", "alternates": ["ß", "š"]},
{"label": "d", "flick": "$", "alternates": ["ð"]},
{"label": "f", "flick": "&"},
{"label": "g", "flick": "*"},
{"label": "h", "flick": "("},
{"label": "j", "flick": ")"},
{"label": "k", "flick": "'"},
{"label": "l", "flick": "\""},
{"label": "ö", "flick": ";", "alternates": ["ø", "œ"]},
{"label": "ä", "flick": ":", "alternates": ["æ"]},
{"type": "enter", "width": 1.5}
],
[
{"type": "shift", "width": 1.5},
{"label": "z", "flick": "%", "alternates": ["ž"]},
{"label": "x", "flick": "-"},
{"label": "c", "flick": "+", "alternates": ["ç", "č"]},
{"label": "v", "flick": "="},
{"label": "b", "flick": "/"},
{"label": "n", "flick": "_", "alternates": ["ñ"]},
{"label": "m", "flick": "~"},
{"label": ",", "flick": "!", "shifted": ","},
{"label": ".", "flick": "?", "shifted": ".", "alternates": ["…"]},
{"label": "-", "flick": "–", "shifted": "-", "alternates": ["—", "•"]},
{"type": "shift"}
],
[
{"type": "layer", "label": ".?123", "target": "numbers", "width": 1.5},
{"type": "globe"},
{"type": "space", "width": 7.5},
{"type": "layer", "label": ".?123", "target": "numbers", "width": 1.5},
{"type": "dismiss"}
]
]
}
]
}
+25 -34
View File
@@ -1,54 +1,45 @@
{
"id": "en-US",
"name": "English (US)",
"locale": "en_US",
"id": "template",
"name": "Template",
"alternates": {
"a": ["á", "à", "â", "ä", "æ", "ã", "å", "ā"],
"c": ["ç", "ć", "č"],
"d": ["ð"],
"e": ["é", "è", "ê", "ë", "ē", "ė", "ę"],
"i": ["í", "ì", "î", "ï", "ī", "į"],
"l": ["ł"],
"n": ["ñ", "ń"],
"o": ["ó", "ò", "ô", "ö", "õ", "ø", "œ", "ō"],
"s": ["ß", "ś", "š"],
"t": ["þ"],
"u": ["ú", "ù", "û", "ü", "ū"],
"y": ["ý", "ÿ"],
"z": ["ž", "ź", "ż"]
},
"layers": [
{
"name": "letters",
"rows": [
[
{"label": "q", "flick": "1"},
{"label": "w", "flick": "2"},
{"label": "e", "flick": "3", "alternates": ["é", "è", "ê", "ë", "ē", "ė", "ę"]},
{"label": "r", "flick": "4"},
{"label": "t", "flick": "5", "alternates": ["þ"]},
{"label": "y", "flick": "6", "alternates": ["ý", "ÿ"]},
{"label": "u", "flick": "7", "alternates": ["ú", "ù", "û", "ü", "ū"]},
{"label": "i", "flick": "8", "alternates": ["í", "ì", "î", "ï", "ī", "į"]},
{"label": "o", "flick": "9", "alternates": ["ó", "ò", "ô", "ö", "õ", "ø", "œ", "ō"]},
{"label": "p", "flick": "0"},
{"type": "backspace", "width": 1.5}
{"type": "letters", "row": 0, "flicks": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]},
{"type": "backspace", "width": 1.5, "stretch": true}
],
[
{"type": "spacer", "width": 0.5},
{"label": "a", "flick": "@", "alternates": ["á", "à", "â", "ä", "æ", "ã", "å", "ā"]},
{"label": "s", "flick": "#", "alternates": ["ß", "ś", "š"]},
{"label": "d", "flick": "$", "alternates": ["ð"]},
{"label": "f", "flick": "&"},
{"label": "g", "flick": "*"},
{"label": "h", "flick": "("},
{"label": "j", "flick": ")"},
{"label": "k", "flick": "'"},
{"label": "l", "flick": "\"", "alternates": ["ł"]},
{"type": "enter", "width": 2}
{"type": "letters", "row": 1, "flicks": ["@", "#", "$", "&", "*", "(", ")", "'", "\""]},
{"type": "enter", "width": 2, "stretch": true}
],
[
{"type": "shift"},
{"label": "z", "flick": "%", "alternates": ["ž", "ź", "ż"]},
{"label": "x", "flick": "-"},
{"label": "c", "flick": "+", "alternates": ["ç", "ć", "č"]},
{"label": "v", "flick": "="},
{"label": "b", "flick": "/"},
{"label": "n", "flick": ";", "alternates": ["ñ", "ń"]},
{"label": "m", "flick": ":"},
{"type": "shift", "stretch": true},
{"type": "letters", "row": 2, "flicks": ["%", "-", "+", "=", "/", ";", ":"]},
{"label": ",", "flick": "!", "shifted": ","},
{"label": ".", "flick": "?", "shifted": ".", "alternates": ["…"]},
{"type": "shift", "width": 1.5}
{"type": "shift", "width": 1.5, "stretch": true}
],
[
{"type": "layer", "label": ".?123", "target": "numbers", "width": 1.5},
{"type": "globe"},
{"type": "space", "width": 6.5},
{"type": "space", "width": 6.5, "stretch": true},
{"type": "layer", "label": ".?123", "target": "numbers", "width": 1.5},
{"type": "dismiss"}
]