+ MultiLineEdit *inputLine = qobject_cast<MultiLineEdit *>(watched);
+ if(!inputLine)
+ return false;
+
+ // Intercept copy key presses
+ if(keyEvent == QKeySequence::Copy) {
+ if(inputLine->hasSelectedText())
+ return false;
+ ChatView *view = qobject_cast<ChatView *>(ui.stackedWidget->currentWidget());
+ if(view)
+ view->scene()->selectionToClipboard();
+ return true;
+ }
+
+ // We don't want to steal cursor movement keys if the input line is in multiline mode
+ if(!inputLine->isSingleLine())
+ return false;
+