-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index 23720cd..a989e10 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp @@ -926,17 +926,18 @@ void TEWidget::setMouseMarks(bool on) #undef KeyPress void TEWidget::emitSelection() // Paste Clipboard by simulating keypress events { #ifndef QT_NO_CLIPBOARD QString text = QApplication::clipboard()->text(); - if ( ! text.isNull() ) +// qDebug(text); + if ( ! text.isNull()) { text.replace(QRegExp("\n"), "\r"); QKeyEvent e(QEvent::KeyPress, 0, -1, 0, text); emit keyPressedSignal(&e); // expose as a big fat keypress event emit clearSelectionSignal(); } #endif } @@ -1062,16 +1063,19 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e ) //lets hardcode this sucker // qDebug("key pressed 2 is 0x%x", ke->key()); emitText("\\"); // expose } else if( ke->state() == ControlButton && ke->key() == Key_V) { pasteClipboard(); } + else if( ke->state() == ControlButton && ke->key() == Key_C) { +// pasteClipboard(); + } else emit keyPressedSignal(ke); // expose ke->accept(); #ifdef FAKE_CTRL_AND_ALT if ( dele ) delete e; #endif return true; // stop the event } |