Files
sloposk/qml/SettingsPanel.qml
T
ericek111andClaude Opus 5.5 ba2f17d665 Full keyboard mode, Ctrl/Alt/Super, dead keys, shift levels
- Full (iPad Pro) mode: every typing key from the keymap, number row,
  tab, caps lock, ctrl/super/alt; shifted symbol shown above and flickable
- Dead keys compose with the locale's XKB compose table
- Ctrl/Alt/Super stick like shift and turn keys into shortcuts; a tapped
  or held shift joins shortcuts and non-text keys, auto-shift and caps
  lock don't
- Auto-capitalization and caps lock only capitalize letters; the user's
  shift picks the keymap's shifted level
- Mode switch in settings keeps key size by resizing the window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:29:24 +02:00

73 lines
2.2 KiB
QML

import QtQuick
import Sloposk
// Replaces the keys while open. Binds straight to Settings, which persists.
Rectangle {
id: panel
required property Settings settings
required property LayoutModel layoutModel
color: Theme.background
radius: Theme.windowRadius
Row {
id: columns
readonly property real columnWidth: (width - spacing) / 2
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
}
}
Column {
width: columns.columnWidth
spacing: 4
SectionHeader { text: qsTr("Keys") }
ToggleRow {
width: parent.width
text: qsTr("Full Keyboard")
detail: qsTr("Number row, tab, ctrl, alt — like iPad Pro")
checked: panel.settings.fullKeyboard
onToggled: checked => panel.settings.fullKeyboard = checked
}
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)
}
}
}
}
}