Full keyboard: stagger the letter rows like a hardware keyboard
- The ISO key left of Z takes its room from left shift (2.25 → 1.25 + 1), so ISO layouts no longer make the shift row the widest - Caps lock and left shift keep their width; only right-hand keys stretch, so A no longer lines up with the key below it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -110,6 +110,20 @@ private Q_SLOTS:
|
||||
QCOMPARE(letterKey(us, u"1"_s).shifted, u"!");
|
||||
}
|
||||
|
||||
void fullModeRowsStagger()
|
||||
{
|
||||
// The key ahead of A, and of the first key on the Z row: like a hardware keyboard,
|
||||
// with the ISO key (sk: |) taking its room from left shift.
|
||||
const auto offsets = [](const Layout &layout) {
|
||||
const QList<Row> &rows = layout.layers.first().rows;
|
||||
return std::pair{rows[2].first().width, rows[3].first().width};
|
||||
};
|
||||
QCOMPARE(offsets(TestLayouts::build("us", KeyboardMode::Full)), std::pair(1.75, 2.25));
|
||||
const Layout sk = TestLayouts::build("sk", KeyboardMode::Full);
|
||||
QCOMPARE(offsets(sk), std::pair(1.75, 1.25));
|
||||
QCOMPARE(sk.layers.first().rows[3].at(1).label, u"\\"_s);
|
||||
}
|
||||
|
||||
void fullModeKeepsDeadKeysAndKeymapShift()
|
||||
{
|
||||
const Layout sk = TestLayouts::build("sk", KeyboardMode::Full);
|
||||
|
||||
Reference in New Issue
Block a user