summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/TEWidget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/TEWidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/TEWidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp
index e535296..d168a5e 100644
--- a/noncore/apps/opie-console/TEWidget.cpp
+++ b/noncore/apps/opie-console/TEWidget.cpp
@@ -1020,25 +1020,25 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e )
1020 static_cast<QKeyEvent *>( e )->ignore(); 1020 static_cast<QKeyEvent *>( e )->ignore();
1021 return true; 1021 return true;
1022 } 1022 }
1023 if ( obj != this /* when embedded */ && obj != parent() /* when standalone */ ) 1023 if ( obj != this /* when embedded */ && obj != parent() /* when standalone */ )
1024 return FALSE; // not us 1024 return FALSE; // not us
1025 if ( e->type() == QEvent::Wheel) { 1025 if ( e->type() == QEvent::Wheel) {
1026 QApplication::sendEvent(scrollbar, e); 1026 QApplication::sendEvent(scrollbar, e);
1027 } 1027 }
1028 1028
1029#ifdef FAKE_CTRL_AND_ALT 1029#ifdef FAKE_CTRL_AND_ALT
1030 static bool control = FALSE; 1030 static bool control = FALSE;
1031 static bool alt = FALSE; 1031 static bool alt = FALSE;
1032// qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:"); 1032// odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl;
1033 bool dele=FALSE; 1033 bool dele=FALSE;
1034 if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { 1034 if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) {
1035 QKeyEvent* ke = (QKeyEvent*)e; 1035 QKeyEvent* ke = (QKeyEvent*)e;
1036 bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); 1036 bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat();
1037 switch (ke->key()) { 1037 switch (ke->key()) {
1038 case Key_F9: // let this be "Control" 1038 case Key_F9: // let this be "Control"
1039 control = keydown; 1039 control = keydown;
1040 e = new QKeyEvent(QEvent::KeyPress, Key_Control, 0, ke->state()); 1040 e = new QKeyEvent(QEvent::KeyPress, Key_Control, 0, ke->state());
1041 dele=TRUE; 1041 dele=TRUE;
1042 break; 1042 break;
1043 case Key_F13: // let this be "Alt" 1043 case Key_F13: // let this be "Alt"
1044 alt = keydown; 1044 alt = keydown;
@@ -1059,29 +1059,29 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e )
1059 ke->ascii(), ke->state()|AltButton, ke->text()); 1059 ke->ascii(), ke->state()|AltButton, ke->text());
1060 dele=TRUE; 1060 dele=TRUE;
1061 } 1061 }
1062 } 1062 }
1063 } 1063 }
1064#endif 1064#endif
1065 1065
1066 if ( e->type() == QEvent::KeyPress ) { 1066 if ( e->type() == QEvent::KeyPress ) {
1067 QKeyEvent* ke = (QKeyEvent*)e; 1067 QKeyEvent* ke = (QKeyEvent*)e;
1068 actSel=0; // Key stroke implies a screen update, so TEWidget won't 1068 actSel=0; // Key stroke implies a screen update, so TEWidget won't
1069 // know where the current selection is. 1069 // know where the current selection is.
1070 1070
1071// qDebug("key pressed is 0x%x",ke->key()); 1071// odebug << "key pressed is 0x" << ke->key() << "" << oendl;
1072 1072
1073 if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker 1073 if( ke->state() == ShiftButton && ke->key() == Key_Tab) { //lets hardcode this sucker
1074 1074
1075// qDebug("key pressed 2 is 0x%x",ke->key()); 1075// odebug << "key pressed 2 is 0x" << ke->key() << "" << oendl;
1076 emitText("\\"); // expose 1076 emitText("\\"); // expose
1077 } else 1077 } else
1078 emit keyPressedSignal(ke); // expose 1078 emit keyPressedSignal(ke); // expose
1079 ke->accept(); 1079 ke->accept();
1080#ifdef FAKE_CTRL_AND_ALT 1080#ifdef FAKE_CTRL_AND_ALT
1081 if ( dele ) delete e; 1081 if ( dele ) delete e;
1082#endif 1082#endif
1083 return true; // stop the event 1083 return true; // stop the event
1084 } 1084 }
1085 if ( e->type() == QEvent::Enter ) { 1085 if ( e->type() == QEvent::Enter ) {
1086 QObject::disconnect( (QObject*)cb, SIGNAL(dataChanged()), 1086 QObject::disconnect( (QObject*)cb, SIGNAL(dataChanged()),
1087 this, SLOT(onClearSelection()) ); 1087 this, SLOT(onClearSelection()) );