Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not generate garbage in terminal when physical shift and alt are s…
…ticky
  • Loading branch information
elros34 committed Aug 23, 2018
1 parent 64a3554 commit 3644a21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions terminal.cpp
Expand Up @@ -178,6 +178,10 @@ void Terminal::keyPress(int key, int modifiers, const QString& text)

resetBackBufferScrollPos();

// physical sticky shift generates key=0, mod=Qt::ShiftModifier, sticky alt: key=0, mod=0
if (key == 0 && (modifiers == Qt::ShiftModifier || modifiers == Qt::NoModifier))
return;

if (key > 0xFFFF) {
int modcode = (modifiers & Qt::ShiftModifier ? 1 : 0) |
(modifiers & Qt::AltModifier ? 2 : 0) |
Expand Down

0 comments on commit 3644a21

Please sign in to comment.