Skip to content

Commit

Permalink
Added Russian and Ukrainian layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
dpurgin committed Oct 31, 2024
1 parent 4dd2990 commit d9acc0e
Show file tree
Hide file tree
Showing 4 changed files with 473 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DeclarativeInputEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ struct DeclarativeInputEnginePrivate {
{DeclarativeInputEngine::LtBs, {"LtSrHrBsLayout", "Bosanski"}},
{DeclarativeInputEngine::CySr, {"CySrBsLayout", "Српски"}},
{DeclarativeInputEngine::LtSr, {"LtSrHrBsLayout", "Srpski"}},
{DeclarativeInputEngine::Sv, {"SvLayout", "Svenska"}}};
{DeclarativeInputEngine::Sv, {"SvLayout", "Svenska"}},
{DeclarativeInputEngine::Ru, {"RuLayout", "Русский", "Пробел"}},
{DeclarativeInputEngine::Uk, {"UkLayout", "Українська", "Пробіл"}},
};
};

DeclarativeInputEnginePrivate::DeclarativeInputEnginePrivate(
Expand Down
2 changes: 2 additions & 0 deletions src/DeclarativeInputEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class DeclarativeInputEngine : public QObject {
LtBs,
CySr,
LtSr,
Ru,
Uk,
EndLayouts
};
Q_ENUM(InputLayouts)
Expand Down
232 changes: 232 additions & 0 deletions src/qml/RuLayout.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
import QtQuick 2.0
import QtQuick.Layouts 1.12

ColumnLayout {
property var inputPanel

RowLayout {
property real keyWeight: 160

Key {
btnText: "й"
inputPanelRef: inputPanel
}

Key {
btnText: "ц"
inputPanelRef: inputPanel
}

Key {
btnText: "у"
inputPanelRef: inputPanel
}

Key {
btnText: "к"
inputPanelRef: inputPanel
}

Key {
btnText: "е"
alternativeKeys: "ё"
inputPanelRef: inputPanel
}

Key {
btnText: "н"
inputPanelRef: inputPanel
}

Key {
btnText: "г"
inputPanelRef: inputPanel
}

Key {
btnText: "ш"
inputPanelRef: inputPanel
}

Key {
btnText: "щ"
inputPanelRef: inputPanel
}

Key {
btnText: "з"
inputPanelRef: inputPanel
}

Key {
btnText: "х"
inputPanelRef: inputPanel
}

BackspaceKey {
inputPanelRef: inputPanel
}

}

RowLayout {
property real keyWeight: 160

Key {
weight: 56
functionKey: true
showPreview: false
btnBackground: "transparent"
}

Key {
btnText: "ф"
inputPanelRef: inputPanel
}

Key {
btnText: "ы"
inputPanelRef: inputPanel
}

Key {
btnText: "в"
inputPanelRef: inputPanel
}

Key {
btnText: "а"
inputPanelRef: inputPanel
}

Key {
btnText: "п"
inputPanelRef: inputPanel
}

Key {
btnText: "р"
inputPanelRef: inputPanel
}

Key {
btnText: "о"
inputPanelRef: inputPanel
}

Key {s
btnText: "л"
inputPanelRef: inputPanel
}

Key {
btnText: "д"
inputPanelRef: inputPanel
}

Key {
btnText: "ж"
inputPanelRef: inputPanel
}

Key {
btnText: "э"
inputPanelRef: inputPanel
}

EnterKey {
weight: 283
inputPanelRef: inputPanel
}
}

RowLayout {
property real keyWeight: 156

ShiftKey {
}

Key {
btnText: "я"
inputPanelRef: inputPanel
}

Key {
btnText: "ч"
inputPanelRef: inputPanel
}

Key {
btnText: "с"
inputPanelRef: inputPanel
}

Key {
btnText: "м"
inputPanelRef: inputPanel
}

Key {
btnText: "и"
inputPanelRef: inputPanel
}

Key {
btnText: "т"
inputPanelRef: inputPanel
}

Key {
btnText: "ь"
alternativeKeys: "ъ"
inputPanelRef: inputPanel
}

Key {
btnText: "б"
inputPanelRef: inputPanel
}

Key {
btnText: "ю"
inputPanelRef: inputPanel
}

ShiftKey {
weight: 204
}

}

RowLayout {
property real keyWeight: 154

SymbolKey {
weight: availableLanguageLayouts.length === 1 ? 217 : 108.5
}

LanguageKey {
visible: availableLanguageLayouts.length > 1
weight: 108.5
}

SpaceKey {
weight: 1168
inputPanelRef: inputPanel
btnDisplayedText: langDescription
}

Key {
btnKey: Qt.Key_Period
btnText: "."
alternativeKeys: ","
inputPanelRef: inputPanel
}

HideKey {
weight: 205
}

}

}
Loading

0 comments on commit d9acc0e

Please sign in to comment.