1 /****************************************************************************
3 ** Copyright (C) 2007-2008 Urs Wolfer <uwolfer @ kde.org>
5 ** This file is part of KDE.
7 ** This program is free software; you can redistribute it and/or modify
8 ** it under the terms of the GNU General Public License as published by
9 ** the Free Software Foundation; either version 2 of the License, or
10 ** (at your option) any later version.
12 ** This program is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ** GNU General Public License for more details.
17 ** You should have received a copy of the GNU General Public License
18 ** along with this program; see the file COPYING. If not, write to
19 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 ** Boston, MA 02110-1301, USA.
22 ****************************************************************************/
26 #include <QMessageBox>
27 #include <QInputDialog>
28 #define KMessageBox QMessageBox
29 #define error(parent, message, caption) \
30 critical(parent, caption, message)
32 #include <QApplication>
37 #include <QHBoxLayout>
38 #include <QVBoxLayout>
40 #include <QMouseEvent>
41 #include <QPushButton>
48 // Definition of key modifier mask constants
49 #define KMOD_Alt_R 0x01
50 #define KMOD_Alt_L 0x02
51 #define KMOD_Meta_L 0x04
52 #define KMOD_Control_L 0x08
53 #define KMOD_Shift_L 0x10
55 VncView::VncView(QWidget *parent, const KUrl &url, RemoteView::Quality quality)
63 m_firstPasswordTry(true),
64 m_dontSendClipboard(false),
65 m_horizontalFactor(1.0),
66 m_verticalFactor(1.0),
67 m_forceLocalCursor(false),
68 force_full_repaint(false),
75 connect(&vncThread, SIGNAL(imageUpdated(int, int, int, int)), this, SLOT(updateImage(int, int, int, int)), Qt::BlockingQueuedConnection);
76 connect(&vncThread, SIGNAL(gotCut(const QString&)), this, SLOT(setCut(const QString&)), Qt::BlockingQueuedConnection);
77 connect(&vncThread, SIGNAL(passwordRequest()), this, SLOT(requestPassword()), Qt::BlockingQueuedConnection);
78 connect(&vncThread, SIGNAL(outputErrorMessage(QString)), this, SLOT(outputErrorMessage(QString)));
80 m_clipboard = QApplication::clipboard();
81 connect(m_clipboard, SIGNAL(selectionChanged()), this, SLOT(clipboardSelectionChanged()));
82 connect(m_clipboard, SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged()));
91 // Disconnect all signals so that we don't get any more callbacks from the client thread
92 vncThread.disconnect();
97 void VncView::forceFullRepaint()
99 force_full_repaint = true;
103 bool VncView::eventFilter(QObject *obj, QEvent *event)
106 if (event->type() == QEvent::KeyPress ||
107 event->type() == QEvent::KeyRelease ||
108 event->type() == QEvent::MouseButtonDblClick ||
109 event->type() == QEvent::MouseButtonPress ||
110 event->type() == QEvent::MouseButtonRelease ||
111 event->type() == QEvent::Wheel ||
112 event->type() == QEvent::MouseMove)
115 return RemoteView::eventFilter(obj, event);
118 QSize VncView::framebufferSize()
120 return m_frame.size();
123 QSize VncView::sizeHint() const
128 QSize VncView::minimumSizeHint() const
133 void VncView::scaleResize(int w, int h)
135 RemoteView::scaleResize(w, h);
137 kDebug(5011) << "scaleResize(): " <<w << h;
139 m_verticalFactor = (qreal) h / m_frame.height();
140 m_horizontalFactor = (qreal) w / m_frame.width();
142 m_verticalFactor = m_horizontalFactor = qMin(m_verticalFactor, m_horizontalFactor);
144 const qreal newW = m_frame.width() * m_horizontalFactor;
145 const qreal newH = m_frame.height() * m_verticalFactor;
147 setMaximumSize(newW, newH); //This is a hack to force Qt to center the view in the scroll area
148 //also causes the widget's size to flicker
155 void VncView::startQuitting()
157 kDebug(5011) << "about to quit";
159 const bool connected = status() == RemoteView::Connected;
161 setStatus(Disconnecting);
171 const bool quitSuccess = vncThread.wait(500);
173 kDebug(5011) << "startQuitting(): Quit VNC thread success:" << quitSuccess;
175 setStatus(Disconnected);
178 bool VncView::isQuitting()
183 bool VncView::start()
185 vncThread.setHost(m_host);
186 vncThread.setPort(m_port);
188 vncThread.setQuality(quality);
190 // set local cursor on by default because low quality mostly means slow internet connection
191 if (quality == RemoteView::Low) {
192 showDotCursor(RemoteView::CursorOn);
195 setStatus(Connecting);
201 bool VncView::supportsScaling() const
206 bool VncView::supportsLocalCursor() const
211 void VncView::requestPassword()
213 kDebug(5011) << "request password";
215 setStatus(Authenticating);
217 if (!m_url.password().isNull()) {
218 vncThread.setPassword(m_url.password());
223 settings.beginGroup("hosts");
224 QString password = settings.value(QString("%1/password").arg(m_host), "").toString();
225 //check for saved password
226 if(m_firstPasswordTry and !password.isEmpty()) {
227 kDebug(5011) << "Trying saved password";
228 m_firstPasswordTry = false;
229 vncThread.setPassword(password);
232 m_firstPasswordTry = false;
235 QDialog dialog(this);
236 dialog.setWindowTitle(tr("Password required"));
238 QLineEdit passwordbox;
239 passwordbox.setEchoMode(QLineEdit::Password);
240 passwordbox.setText(password);
241 QCheckBox save_password(tr("Save Password"));
242 save_password.setChecked(!password.isEmpty()); //offer to overwrite saved password
243 QPushButton ok_button(tr("Done"));
244 ok_button.setMaximumWidth(100);
245 connect(&ok_button, SIGNAL(clicked()),
246 &dialog, SLOT(accept()));
250 layout2.addWidget(&passwordbox);
251 layout2.addWidget(&save_password);
252 layout1.addLayout(&layout2);
253 layout1.addWidget(&ok_button);
254 dialog.setLayout(&layout1);
256 if(dialog.exec()) { //dialog accepted
257 password = passwordbox.text();
259 if(save_password.isChecked()) {
260 kDebug(5011) << "Saving password for host '" << m_host << "'";
262 settings.setValue(QString("%1/password").arg(m_host), password);
266 vncThread.setPassword(password);
272 void VncView::outputErrorMessage(const QString &message)
274 kDebug(5011) << message;
276 if (message == "INTERNAL:APPLE_VNC_COMPATIBILTY") {
277 setCursor(localDotCursor());
278 m_forceLocalCursor = true;
284 emit errorMessage(i18n("VNC failure"), message);
287 void VncView::updateImage(int x, int y, int w, int h)
289 if(!QApplication::focusWidget()) { //no focus, we're probably minimized
292 //kDebug(5011) << "got update" << width() << height();
293 static unsigned int frames = 0;
294 static unsigned int updates = 0;
295 static QTime time = QTime::currentTime();
297 if(updates % 100 == 0)
298 kDebug(5011) << "u/s: " << updates/double(time.elapsed()) * 1000.0;
299 if(x == 0 and y == 0) {
301 if(frames % 100 == 0)
302 kDebug(5011) << "f/s: " << frames/double(time.elapsed()) * 1000.0;
310 if (m_horizontalFactor != 1.0 || m_verticalFactor != 1.0) {
311 // If the view is scaled, grow the update rectangle to avoid artifacts
312 int x_extrapixels = 1.0/m_horizontalFactor+1;
313 int y_extrapixels = 1.0/m_verticalFactor+1;
317 m_w+=2*x_extrapixels;
318 m_h+=2*y_extrapixels;
321 m_frame = vncThread.image();
324 setAttribute(Qt::WA_StaticContents);
325 setAttribute(Qt::WA_OpaquePaintEvent);
326 installEventFilter(this);
328 setCursor(((m_dotCursorState == CursorOn) || m_forceLocalCursor) ? localDotCursor() : Qt::BlankCursor);
330 setMouseTracking(true); // get mouse events even when there is no mousebutton pressed
331 setFocusPolicy(Qt::WheelFocus);
332 setStatus(Connected);
333 // emit framebufferSizeChanged(m_frame.width(), m_frame.height());
338 scaleResize(parentWidget()->width(), parentWidget()->height());
340 scaleResize(width(), height());
347 static QSize old_frame_size = QSize();
348 if ((y == 0 && x == 0) && (m_frame.size() != old_frame_size)) {
349 old_frame_size = m_frame.size();
350 kDebug(5011) << "Updating framebuffer size";
352 //setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
354 scaleResize(parentWidget()->width(), parentWidget()->height());
356 kDebug(5011) << "Resizing: " << m_frame.width() << m_frame.height();
357 resize(m_frame.width(), m_frame.height());
358 //setMaximumSize(m_frame.width(), m_frame.height()); //This is a hack to force Qt to center the view in the scroll area
359 //setMinimumSize(m_frame.width(), m_frame.height());
361 emit framebufferSizeChanged(m_frame.width(), m_frame.height());
365 repaint(qRound(m_x * m_horizontalFactor), qRound(m_y * m_verticalFactor), qRound(m_w * m_horizontalFactor), qRound(m_h * m_verticalFactor));
369 void VncView::setViewOnly(bool viewOnly)
371 RemoteView::setViewOnly(viewOnly);
373 m_dontSendClipboard = viewOnly;
376 setCursor(Qt::ArrowCursor);
378 setCursor(m_dotCursorState == CursorOn ? localDotCursor() : Qt::BlankCursor);
381 void VncView::showDotCursor(DotCursorState state)
383 RemoteView::showDotCursor(state);
385 setCursor(state == CursorOn ? localDotCursor() : Qt::BlankCursor);
388 void VncView::enableScaling(bool scale)
390 RemoteView::enableScaling(scale);
393 //setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
394 //setMinimumSize(1, 1);
396 scaleResize(parentWidget()->width(), parentWidget()->height());
398 scaleResize(width(), height());
400 m_verticalFactor = 1.0;
401 m_horizontalFactor = 1.0;
403 //setMaximumSize(m_frame.width(), m_frame.height()); //This is a hack to force Qt to center the view in the scroll area
404 //setMinimumSize(m_frame.width(), m_frame.height());
405 resize(m_frame.width(), m_frame.height());
409 void VncView::setCut(const QString &text)
411 m_dontSendClipboard = true;
412 m_clipboard->setText(text, QClipboard::Clipboard);
413 m_clipboard->setText(text, QClipboard::Selection);
414 m_dontSendClipboard = false;
417 void VncView::paintEvent(QPaintEvent *event)
419 //kDebug(5011) << "paint event: x: " << m_x << ", y: " << m_y << ", w: " << m_w << ", h: " << m_h;
420 if (m_frame.isNull() || m_frame.format() == QImage::Format_Invalid) {
421 kDebug(5011) << "no valid image to paint";
422 RemoteView::paintEvent(event);
428 QPainter painter(this);
430 if (m_repaint and !force_full_repaint) {
431 // kDebug(5011) << "normal repaint";
432 painter.drawImage(QRect(qRound(m_x*m_horizontalFactor), qRound(m_y*m_verticalFactor),
433 qRound(m_w*m_horizontalFactor), qRound(m_h*m_verticalFactor)),
434 m_frame.copy(m_x, m_y, m_w, m_h).scaled(qRound(m_w*m_horizontalFactor),
435 qRound(m_h*m_verticalFactor),
436 Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
438 //kDebug(5011) << "resize repaint";
439 QRect rect = event->rect();
440 if (!force_full_repaint and (rect.width() != width() || rect.height() != height())) {
441 // kDebug(5011) << "Partial repaint";
442 const int sx = rect.x()/m_horizontalFactor;
443 const int sy = rect.y()/m_verticalFactor;
444 const int sw = rect.width()/m_horizontalFactor;
445 const int sh = rect.height()/m_verticalFactor;
446 painter.drawImage(rect,
447 m_frame.copy(sx, sy, sw, sh).scaled(rect.width(), rect.height(),
448 Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
450 kDebug(5011) << "Full repaint" << width() << height() << m_frame.width() << m_frame.height();
451 painter.drawImage(QRect(0, 0, width(), height()),
452 m_frame.scaled(m_frame.width() * m_horizontalFactor, m_frame.height() * m_verticalFactor,
453 Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
454 force_full_repaint = false;
458 //draw local cursor ourselves, normal mouse pointer doesn't deal with scrolling
459 if((m_dotCursorState == CursorOn) || m_forceLocalCursor) {
460 const uchar bits[] = { 0xff, 0x8e, 0x8e, 0x8e, 0xff };
461 const bool little_endian = (Q_BYTE_ORDER == Q_LITTLE_ENDIAN);
462 const QBitmap cursorBitmap = QBitmap::fromData(QSize(5,5), bits , little_endian?QImage::Format_Mono:QImage::Format_MonoLSB);
464 #if QT_VERSION >= 0x040500
465 painter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
468 painter.drawPixmap(cursor_x-2, cursor_y-2, cursorBitmap);
469 //TODO update position of last cursor_x/y to avoid artifacts
472 RemoteView::paintEvent(event);
475 void VncView::resizeEvent(QResizeEvent *event)
477 RemoteView::resizeEvent(event);
478 scaleResize(event->size().width(), event->size().height());
482 bool VncView::event(QEvent *event)
484 switch (event->type()) {
485 case QEvent::KeyPress:
486 case QEvent::KeyRelease:
487 // kDebug(5011) << "keyEvent";
488 keyEventHandler(static_cast<QKeyEvent*>(event));
491 case QEvent::MouseButtonDblClick:
492 case QEvent::MouseButtonPress:
493 case QEvent::MouseButtonRelease:
494 case QEvent::MouseMove:
495 // kDebug(5011) << "mouseEvent";
496 mouseEventHandler(static_cast<QMouseEvent*>(event));
500 // kDebug(5011) << "wheelEvent";
501 wheelEventHandler(static_cast<QWheelEvent*>(event));
504 case QEvent::WindowActivate: //input panel may have been closed, prevent IM from interfering with hardware keyboard
505 setAttribute(Qt::WA_InputMethodEnabled, false);
508 return RemoteView::event(event);
512 //call with e == 0 to flush held events
513 void VncView::mouseEventHandler(QMouseEvent *e)
515 static bool tap_detected = false;
516 static bool double_tap_detected = false;
517 static bool tap_drag_detected = false;
518 static QTime press_time;
519 static QTime up_time; //used for double clicks/tap&drag, for time after first tap
521 const int TAP_PRESS_TIME = 180;
522 const int DOUBLE_TAP_UP_TIME = 500;
524 if(!e) { //flush held taps
526 m_buttonMask |= 0x01;
527 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
528 m_buttonMask &= 0xfe;
529 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
530 tap_detected = false;
531 } else if(double_tap_detected and press_time.elapsed() > TAP_PRESS_TIME) { //got tap + another press -> tap & drag
532 m_buttonMask |= 0x01;
533 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
534 double_tap_detected = false;
535 tap_drag_detected = true;
541 if(e->x() < 0 or e->y() < 0) { //QScrollArea tends to send invalid events sometimes...
546 cursor_x = qRound(e->x()/m_horizontalFactor);
547 cursor_y = qRound(e->y()/m_verticalFactor);
548 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask); // plain move event
550 if(disable_tapping) { //only move cursor
555 if(e->button() == Qt::LeftButton) { //implement touchpad-like input for left button
556 if(e->type() == QEvent::MouseButtonPress or e->type() == QEvent::MouseButtonDblClick) {
558 if(tap_detected and up_time.elapsed() < DOUBLE_TAP_UP_TIME) {
559 tap_detected = false;
560 double_tap_detected = true;
562 QTimer::singleShot(TAP_PRESS_TIME, this, SLOT(mouseEventHandler()));
564 } else if(e->type() == QEvent::MouseButtonRelease) {
565 if(tap_drag_detected) {
566 m_buttonMask &= 0xfe;
567 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
568 tap_drag_detected = false;
569 } else if(double_tap_detected) { //double click
570 double_tap_detected = false;
572 m_buttonMask |= 0x01;
573 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
574 m_buttonMask &= 0xfe;
575 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
576 m_buttonMask |= 0x01;
577 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
578 m_buttonMask &= 0xfe;
579 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
580 } else if(press_time.elapsed() < TAP_PRESS_TIME) { //tap
583 QTimer::singleShot(DOUBLE_TAP_UP_TIME, this, SLOT(mouseEventHandler()));
587 } else { //middle or right button, send directly
588 if ((e->type() == QEvent::MouseButtonPress)) {
589 if (e->button() & Qt::MidButton)
590 m_buttonMask |= 0x02;
591 if (e->button() & Qt::RightButton)
592 m_buttonMask |= 0x04;
593 } else if (e->type() == QEvent::MouseButtonRelease) {
594 if (e->button() & Qt::MidButton)
595 m_buttonMask &= 0xfd;
596 if (e->button() & Qt::RightButton)
597 m_buttonMask &= 0xfb;
599 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
603 void VncView::wheelEventHandler(QWheelEvent *event)
606 if (event->delta() < 0)
611 const int x = qRound(event->x() / m_horizontalFactor);
612 const int y = qRound(event->y() / m_verticalFactor);
614 vncThread.mouseEvent(x, y, eb | m_buttonMask);
615 vncThread.mouseEvent(x, y, m_buttonMask);
618 void VncView::keyEventHandler(QKeyEvent *e)
620 // strip away autorepeating KeyRelease; see bug #206598
621 if (e->isAutoRepeat() && (e->type() == QEvent::KeyRelease)) {
625 // parts of this code are based on http://italc.sourcearchive.com/documentation/1.0.9.1/vncview_8cpp-source.html
626 rfbKeySym k = e->nativeVirtualKey();
628 // we do not handle Key_Backtab separately as the Shift-modifier
629 // is already enabled
630 if (e->key() == Qt::Key_Backtab) {
634 const bool pressed = (e->type() == QEvent::KeyPress);
637 //don't send ISO_Level3_Shift (would break things like Win+0-9)
638 //also enable IM so symbol key works
640 setAttribute(Qt::WA_InputMethodEnabled, pressed);
647 if (k == XK_Shift_L || k == XK_Control_L || k == XK_Meta_L || k == XK_Alt_L) {
650 } else if (m_mods.contains(k)) {
658 int current_zoom = -1;
659 if(e->key() == Qt::Key_F8)
660 current_zoom = left_zoom;
661 else if(e->key() == Qt::Key_F7)
662 current_zoom = right_zoom;
664 // kDebug(5011) << "got '" << e->text() << "'.";
665 vncThread.keyEvent(k, pressed);
667 kDebug(5011) << "nativeVirtualKey() for '" << e->text() << "' failed.";
671 if(current_zoom == -1)
674 //handle zoom buttons
675 if(current_zoom == 0) { //left click
677 m_buttonMask |= 0x01;
679 m_buttonMask &= 0xfe;
680 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
681 } else if(current_zoom == 1) { //right click
683 m_buttonMask |= 0x04;
685 m_buttonMask &= 0xfb;
686 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
687 } else if(current_zoom == 2) { //middle click
689 m_buttonMask |= 0x02;
691 m_buttonMask &= 0xfd;
692 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
693 } else if(current_zoom == 3 and pressed) { //wheel up
695 vncThread.mouseEvent(cursor_x, cursor_y, eb | m_buttonMask);
696 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
697 } else if(current_zoom == 4 and pressed) { //wheel down
699 vncThread.mouseEvent(cursor_x, cursor_y, eb | m_buttonMask);
700 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
701 } else if(current_zoom == 5) { //page up
702 vncThread.keyEvent(0xff55, pressed);
703 } else if(current_zoom == 6) { //page down
704 vncThread.keyEvent(0xff56, pressed);
708 void VncView::unpressModifiers()
710 const QList<unsigned int> keys = m_mods.keys();
711 QList<unsigned int>::const_iterator it = keys.constBegin();
712 while (it != keys.end()) {
713 vncThread.keyEvent(*it, false);
719 void VncView::clipboardSelectionChanged()
723 if (m_status != Connected)
726 if (m_clipboard->ownsSelection() || m_dontSendClipboard)
729 const QString text = m_clipboard->text(QClipboard::Selection);
731 vncThread.clientCut(text);
734 void VncView::clipboardDataChanged()
738 if (m_status != Connected)
741 if (m_clipboard->ownsClipboard() || m_dontSendClipboard)
744 const QString text = m_clipboard->text(QClipboard::Clipboard);
746 vncThread.clientCut(text);
750 void VncView::sendKey(Qt::Key key)
752 //convert Qt::Key into x11 keysym
764 case Qt::Key_PageDown:
782 case Qt::Key_Backspace:
797 k = 0xffbe + int(key - Qt::Key_F1);
800 case Qt::MetaModifier:
804 case Qt::AltModifier:
807 case Qt::Key_Control:
808 case Qt::ControlModifier:
812 kDebug(5011) << "sendKey(): Unhandled Qt::Key value " << key;
816 if (k == XK_Shift_L || k == XK_Control_L || k == XK_Meta_L || k == XK_Alt_L || k == XK_Super_L) {
817 if (m_mods.contains(k)) { //release
819 vncThread.keyEvent(k, false);
822 vncThread.keyEvent(k, true);
824 } else { //normal key
825 vncThread.keyEvent(k, true);
826 vncThread.keyEvent(k, false);
830 void VncView::sendKeySequence(QKeySequence keys)
832 Q_ASSERT(keys.count() <= 1); //we can only handle a single combination
834 //to get at individual key presses, we split 'keys' into its components
836 for(int i = 0; ; i++) {
837 QString k = keys.toString().section('+', i, i);
840 //kDebug(5011) << "found key: " << k;
842 key_list.append(Qt::Key_Alt);
843 } else if(k == "Ctrl") {
844 key_list.append(Qt::Key_Control);
845 } else if(k == "Meta") {
846 key_list.append(Qt::Key_Meta);
848 key_list.append(QKeySequence(k)[0]);
852 for(int i = 0; i < key_list.count(); i++)
853 sendKey(Qt::Key(key_list.at(i)));
855 //release modifiers (everything before final key)
856 for(int i = key_list.count()-2; i >= 0; i--)
857 sendKey(Qt::Key(key_list.at(i)));
860 void VncView::reloadSettings()
863 left_zoom = settings.value("left_zoom", 0).toInt();
864 right_zoom = settings.value("right_zoom", 1).toInt();
865 disable_tapping = settings.value("disable_tapping", false).toBool();
868 //convert commitString into keyevents
869 void VncView::inputMethodEvent(QInputMethodEvent *event)
871 //TODO handle replacements
872 //NOTE for the return key to work Qt needs to enable multiline input, which only works for Q(Plain)TextEdit
874 //kDebug(5011) << event->commitString() << "|" << event->preeditString() << "|" << event->replacementLength() << "|" << event->replacementStart();
875 QString letters = event->commitString();
876 for(int i = 0; i < letters.length(); i++) {
877 char k = letters.at(i).toLatin1(); //works with all 'normal' keys, not umlauts.
879 kDebug(5011) << "unhandled key";
882 vncThread.keyEvent(k, true);
883 vncThread.keyEvent(k, false);
888 #include "moc_vncview.cpp"