Add an AltGr key; full-mode letters flick to their AltGr symbol
The right alt in full mode is now AltGr: sticky like the other modifiers, it types the keymap's third/fourth level (sk: AltGr+J = ') instead of an Alt shortcut. In hold-keys mode it holds the physical right alt, since KWin resets the modifier state after an ISO_Level3_Shift keysym. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,10 @@ KeyDef characterKey(const KeymapKey &source)
|
||||
key.shifted = source.upper;
|
||||
key.dead = source.deadLower;
|
||||
key.deadShifted = source.deadUpper;
|
||||
key.altGr = source.altGr;
|
||||
key.altGrShifted = source.altGrUpper;
|
||||
key.deadAltGr = source.deadAltGr;
|
||||
key.deadAltGrShifted = source.deadAltGrUpper;
|
||||
return key;
|
||||
}
|
||||
|
||||
@@ -54,7 +58,8 @@ QList<KeyDef> letterKeys(const KeymapKeys &keymap, int row, const QStringList &f
|
||||
return keys;
|
||||
}
|
||||
|
||||
// A full row: every typing key, the shifted symbol shown (and flickable) above.
|
||||
// A full row: every typing key, the shifted symbol shown (and flickable) above;
|
||||
// for letters, whose shift only capitalizes, the AltGr symbol (sk: ' on j).
|
||||
// `withLessGreater` tells whether the ISO key left of Z is among them.
|
||||
QList<KeyDef> rowKeys(const KeymapKeys &keymap, int row, bool *withLessGreater)
|
||||
{
|
||||
@@ -76,6 +81,8 @@ QList<KeyDef> rowKeys(const KeymapKeys &keymap, int row, bool *withLessGreater)
|
||||
// Show (and flick for) a shifted level that isn't just the capital letter: ! on 1, " on sk ô.
|
||||
if (!source.deadUpper && source.upper != source.lower && source.upper != source.lower.toUpper())
|
||||
key.flick = source.upper;
|
||||
else if (!source.deadAltGr && source.altGr != source.lower)
|
||||
key.flick = source.altGr;
|
||||
keys.append(key);
|
||||
}
|
||||
return keys;
|
||||
|
||||
Reference in New Issue
Block a user