Exclude modifier keys from triggering typing notifications

fixes #116
remotes/origin/HEAD
Konstantinos Sideris 7 years ago
parent 8c5a331c73
commit 595d11cfa0
  1. 11
      src/TextInputWidget.cc

@ -40,11 +40,14 @@ FilteredTextEdit::FilteredTextEdit(QWidget *parent)
void
FilteredTextEdit::keyPressEvent(QKeyEvent *event)
{
if (!typingTimer_->isActive()) {
emit startedTyping();
}
const bool isModifier = (event->modifiers() != Qt::NoModifier);
if (!isModifier) {
if (!typingTimer_->isActive())
emit startedTyping();
typingTimer_->start();
typingTimer_->start();
}
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) {
stopTyping();

Loading…
Cancel
Save