Diffstat (limited to 'noncore/net/opieirc/ircmisc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircmisc.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/noncore/net/opieirc/ircmisc.cpp b/noncore/net/opieirc/ircmisc.cpp index 6d93a34..df6f874 100644 --- a/noncore/net/opieirc/ircmisc.cpp +++ b/noncore/net/opieirc/ircmisc.cpp | |||
@@ -66,10 +66,17 @@ void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) { | |||
66 | } else if (key == Key_Return) { | 66 | } else if (key == Key_Return) { |
67 | m_history.prepend(text()); | 67 | m_history.prepend(text()); |
68 | m_index = -1; | 68 | m_index = -1; |
69 | } else if (key == Key_Tab) { | 69 | } else if (key == Key_N && event->state() == Qt::ControlButton) { |
70 | odebug << "got tab" << oendl; | 70 | emit nextTab(); |
71 | return; | ||
72 | } else if ( ( key == Key_Y || key == Key_Z ) && event->state() == Qt::ControlButton) { | ||
73 | emit closeTab(); | ||
74 | return; | ||
75 | } else if (key == Key_P && event->state() == Qt::ControlButton) { | ||
76 | emit prevTab(); | ||
71 | return; | 77 | return; |
72 | } | 78 | } |
79 | |||
73 | QLineEdit::keyPressEvent(event); | 80 | QLineEdit::keyPressEvent(event); |
74 | } | 81 | } |
75 | 82 | ||
@@ -78,9 +85,15 @@ bool IRCHistoryLineEdit::eventFilter(QObject *object, QEvent *event) { | |||
78 | QKeyEvent *k = (QKeyEvent *) event; | 85 | QKeyEvent *k = (QKeyEvent *) event; |
79 | /* Catch tab characters */ | 86 | /* Catch tab characters */ |
80 | if (k->key() == Key_Tab) { | 87 | if (k->key() == Key_Tab) { |
81 | odebug << "tab!" << oendl; | 88 | emit nextTab(); |
82 | return TRUE; | 89 | return TRUE; |
83 | } | 90 | } |
84 | } | 91 | } |
85 | return QLineEdit::eventFilter(object, event); | 92 | return QLineEdit::eventFilter(object, event); |
86 | } | 93 | } |
94 | |||
95 | |||
96 | void IRCHistoryLineEdit::setEditFocus() { | ||
97 | setActiveWindow(); | ||
98 | setFocus(); | ||
99 | } | ||