Optional PC key blocks: function row, navigation, numeric keypad

- Template sections placed above or to the right of the typing keys;
  the user picks any mix in settings, typing keys included
- keysym keys send XKB keysyms on press, optionally repeating
- Geometry lays blocks side by side with one key unit; stretch keys are
  resolved at layout time so composed blocks line up
- Toggling a block resizes the window so keys keep their size

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 21:18:10 +02:00
co-authored by Claude Opus 5.5
parent e532f5c072
commit 88338fde22
22 changed files with 521 additions and 101 deletions
+1
View File
@@ -46,6 +46,7 @@ Window {
anchors.fill: keyboard
visible: root.settingsOpen
settings: root.settings
layoutModel: root.layoutModel
}
DragHandle {
+9
View File
@@ -0,0 +1,9 @@
import QtQuick
// Small caps-style title above a group of settings.
Text {
color: Theme.secondaryText
font.pixelSize: 12
font.capitalization: Font.AllUppercase
bottomPadding: 4
}
+46 -15
View File
@@ -6,28 +6,59 @@ Rectangle {
id: panel
required property Settings settings
required property LayoutModel layoutModel
color: Theme.background
radius: Theme.windowRadius
Column {
anchors { fill: parent; margins: 16 }
spacing: 4
Row {
id: columns
readonly property real columnWidth: (width - spacing) / 2
ToggleRow {
width: parent.width
text: qsTr("Auto-Capitalization")
detail: qsTr("Shift at the start of a sentence")
checked: panel.settings.autoCapitalize
onToggled: checked => panel.settings.autoCapitalize = checked
anchors { fill: parent; margins: 16 }
spacing: 32
Column {
width: columns.columnWidth
spacing: 4
SectionHeader { text: qsTr("Typing") }
ToggleRow {
width: parent.width
text: qsTr("Auto-Capitalization")
detail: qsTr("Shift at the start of a sentence")
checked: panel.settings.autoCapitalize
onToggled: checked => panel.settings.autoCapitalize = checked
}
ToggleRow {
width: parent.width
text: qsTr("“.” Shortcut")
detail: qsTr("Double-tap space for a period and a space")
checked: panel.settings.doubleSpacePeriod
onToggled: checked => panel.settings.doubleSpacePeriod = checked
}
}
ToggleRow {
width: parent.width
text: qsTr("“.” Shortcut")
detail: qsTr("Double-tap space for a period and a space")
checked: panel.settings.doubleSpacePeriod
onToggled: checked => panel.settings.doubleSpacePeriod = checked
Column {
width: columns.columnWidth
spacing: 4
SectionHeader { text: qsTr("Keys") }
Repeater {
// "main" is the typing keys; the rest come from the template.
model: [{ id: "main", name: qsTr("Typing keys") }].concat(panel.layoutModel.sections)
ToggleRow {
required property var modelData
width: parent.width
text: modelData.name
checked: panel.settings.visibleSections.includes(modelData.id)
onToggled: checked => panel.settings.setSectionVisible(modelData.id, checked)
}
}
}
}
}