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>
This commit is contained in:
2026-10-14 21:29:24 +02:00
co-authored by Claude Opus 5.5
parent 88338fde22
commit ba2f17d665
36 changed files with 948 additions and 202 deletions
+11
View File
@@ -8,6 +8,7 @@ namespace {
constexpr auto AutoCapitalizeKey = "typing/autoCapitalize";
constexpr auto DoubleSpacePeriodKey = "typing/doubleSpacePeriod";
constexpr auto VisibleSectionsKey = "layout/visibleSections";
constexpr auto FullKeyboardKey = "layout/fullKeyboard";
}
Settings::Settings(QObject *parent)
@@ -20,6 +21,16 @@ Settings::Settings(QObject *parent)
m_visibleSections = store.value(VisibleSectionsKey, QStringList{MainSectionId}).toStringList();
if (m_visibleSections.isEmpty())
m_visibleSections = {MainSectionId};
m_fullKeyboard = store.value(FullKeyboardKey, false).toBool();
}
void Settings::setFullKeyboard(bool full)
{
if (full == m_fullKeyboard)
return;
m_fullKeyboard = full;
QSettings().setValue(FullKeyboardKey, full);
Q_EMIT fullKeyboardChanged();
}
void Settings::setSectionVisible(const QString &id, bool visible)
+7
View File
@@ -17,6 +17,8 @@ class Settings : public QObject
Q_PROPERTY(bool doubleSpacePeriod READ doubleSpacePeriod WRITE setDoubleSpacePeriod NOTIFY typingOptionsChanged)
// Which key blocks are shown: "main" (the typing keys) and template section ids.
Q_PROPERTY(QStringList visibleSections READ visibleSections NOTIFY visibleSectionsChanged)
// iPad Pro-style full keyboard (number row, tab, ctrl/alt/super) instead of the compact one.
Q_PROPERTY(bool fullKeyboard READ fullKeyboard WRITE setFullKeyboard NOTIFY fullKeyboardChanged)
public:
explicit Settings(QObject *parent = nullptr);
@@ -32,13 +34,18 @@ public:
// Hiding the last visible section is refused: something must stay on screen.
Q_INVOKABLE void setSectionVisible(const QString &id, bool visible);
bool fullKeyboard() const { return m_fullKeyboard; }
void setFullKeyboard(bool full);
Q_SIGNALS:
void typingOptionsChanged();
void visibleSectionsChanged();
void fullKeyboardChanged();
private:
void setTypingOptions(const TypingOptions &options);
TypingOptions m_typing;
QStringList m_visibleSections;
bool m_fullKeyboard = false;
};