Skip to content

Commit

Permalink
Don't send Ctrl+Alt+(Key) on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-px2 committed Sep 4, 2021
1 parent 872522d commit dc326ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,11 @@ void EditorArea::keyPressEvent(QKeyEvent* event)
bool ctrl = modifiers & Qt::ControlModifier;
bool shift = modifiers & Qt::ShiftModifier;
bool alt = modifiers & Qt::AltModifier;
#ifdef Q_OS_WIN
// Windows: Ctrl+Alt (AltGr) is used for alternate characters
// don't send modifiers with text
if (ctrl && alt) { ctrl = false; alt = false; }
#endif
bool is_special = false;
const QString& text = event->text();
std::string key = event_to_string(event, &is_special);
Expand Down

0 comments on commit dc326ac

Please sign in to comment.