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 //local cursor width/height in px, should be an odd number
56 const int CURSOR_SIZE = 7;
58 const int TAP_PRESS_TIME = 180;
59 const int DOUBLE_TAP_UP_TIME = 500;
62 VncView::VncView(QWidget *parent, const KUrl &url, RemoteView::Quality quality, int listen_port)
70 m_firstPasswordTry(true),
71 m_dontSendClipboard(false),
72 m_horizontalFactor(1.0),
73 m_verticalFactor(1.0),
74 m_forceLocalCursor(false),
75 force_full_repaint(false),
77 listen_port(listen_port)
83 //BlockingQueuedConnection can cause deadlocks when exiting, handled in startQuitting()
84 connect(&vncThread, SIGNAL(imageUpdated(int, int, int, int)), this, SLOT(updateImage(int, int, int, int)), Qt::BlockingQueuedConnection);
85 connect(&vncThread, SIGNAL(gotCut(const QString&)), this, SLOT(setCut(const QString&)), Qt::BlockingQueuedConnection);
86 connect(&vncThread, SIGNAL(passwordRequest()), this, SLOT(requestPassword()), Qt::BlockingQueuedConnection);
87 connect(&vncThread, SIGNAL(outputErrorMessage(QString)), this, SLOT(outputErrorMessage(QString)));
89 m_clipboard = QApplication::clipboard();
90 connect(m_clipboard, SIGNAL(selectionChanged()), this, SLOT(clipboardSelectionChanged()));
91 connect(m_clipboard, SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged()));
100 // Disconnect all signals so that we don't get any more callbacks from the client thread
101 vncThread.disconnect();
106 void VncView::forceFullRepaint()
108 force_full_repaint = true;
112 bool VncView::eventFilter(QObject *obj, QEvent *event)
115 if (event->type() == QEvent::KeyPress ||
116 event->type() == QEvent::KeyRelease ||
117 event->type() == QEvent::MouseButtonDblClick ||
118 event->type() == QEvent::MouseButtonPress ||
119 event->type() == QEvent::MouseButtonRelease ||
120 event->type() == QEvent::Wheel ||
121 event->type() == QEvent::MouseMove)
124 return RemoteView::eventFilter(obj, event);
127 QSize VncView::framebufferSize()
129 return m_frame.size();
132 QSize VncView::sizeHint() const
137 QSize VncView::minimumSizeHint() const
142 void VncView::startQuitting()
144 kDebug(5011) << "about to quit";
146 //const bool connected = status() == RemoteView::Connected;
148 setStatus(Disconnecting);
152 //if(connected) //remove if things work without it
155 const bool quitSuccess = vncThread.wait(700);
157 //happens when vncThread wants to call a slot via BlockingQueuedConnection,
158 //needs an event loop in this thread so execution continues after 'emit'
160 if(!loop.processEvents())
161 kDebug(5011) << "BUG: deadlocked, but no events to deliver?";
164 setStatus(Disconnected);
167 bool VncView::isQuitting()
172 bool VncView::start()
174 vncThread.setHost(m_host);
175 vncThread.setPort(m_port);
176 vncThread.setListenPort(listen_port); //if port is != 0, thread will listen for connections
177 vncThread.setQuality(quality);
179 // set local cursor on by default because low quality mostly means slow internet connection
180 if (quality == RemoteView::Low) {
181 showDotCursor(RemoteView::CursorOn);
184 setStatus(Connecting);
190 bool VncView::supportsScaling() const
195 bool VncView::supportsLocalCursor() const
200 void VncView::requestPassword()
202 kDebug(5011) << "request password";
204 setStatus(Authenticating);
206 if (!m_url.password().isNull()) {
207 vncThread.setPassword(m_url.password());
212 settings.beginGroup("hosts");
213 QString password = settings.value(QString("%1/password").arg(m_host), "").toString();
214 //check for saved password
215 if(m_firstPasswordTry and !password.isEmpty()) {
216 kDebug(5011) << "Trying saved password";
217 m_firstPasswordTry = false;
218 vncThread.setPassword(password);
221 m_firstPasswordTry = false;
224 QDialog dialog(this);
225 dialog.setWindowTitle(tr("Password required"));
227 QLineEdit passwordbox;
228 passwordbox.setEchoMode(QLineEdit::Password);
229 passwordbox.setText(password);
230 QCheckBox save_password(tr("Save Password"));
231 save_password.setChecked(!password.isEmpty()); //offer to overwrite saved password
232 QPushButton ok_button(tr("Done"));
233 ok_button.setMaximumWidth(100);
234 connect(&ok_button, SIGNAL(clicked()),
235 &dialog, SLOT(accept()));
239 layout2.addWidget(&passwordbox);
240 layout2.addWidget(&save_password);
241 layout1.addLayout(&layout2);
242 layout1.addWidget(&ok_button);
243 dialog.setLayout(&layout1);
245 if(dialog.exec()) { //dialog accepted
246 password = passwordbox.text();
248 if(save_password.isChecked()) {
249 kDebug(5011) << "Saving password for host '" << m_host << "'";
251 settings.setValue(QString("%1/password").arg(m_host), password);
255 vncThread.setPassword(password);
261 void VncView::outputErrorMessage(const QString &message)
263 kDebug(5011) << message;
265 if (message == "INTERNAL:APPLE_VNC_COMPATIBILTY") {
266 setCursor(localDotCursor());
267 m_forceLocalCursor = true;
273 emit errorMessage(i18n("VNC failure"), message);
276 void VncView::updateImage(int x, int y, int w, int h)
278 if(!QApplication::focusWidget()) { //no focus, we're probably minimized
282 //kDebug(5011) << "got update" << width() << height();
289 if (m_horizontalFactor != 1.0 || m_verticalFactor != 1.0) {
290 // If the view is scaled, grow the update rectangle to avoid artifacts
291 int x_extrapixels = 1.0/m_horizontalFactor + 1;
292 int y_extrapixels = 1.0/m_verticalFactor + 1;
296 m_w+=2*x_extrapixels;
297 m_h+=2*y_extrapixels;
300 m_frame = vncThread.image();
303 setAttribute(Qt::WA_StaticContents);
304 setAttribute(Qt::WA_OpaquePaintEvent);
305 installEventFilter(this);
307 setCursor(((m_dotCursorState == CursorOn) || m_forceLocalCursor) ? localDotCursor() : Qt::BlankCursor);
309 setMouseTracking(true); // get mouse events even when there is no mousebutton pressed
310 setFocusPolicy(Qt::WheelFocus);
311 setStatus(Connected);
312 // emit framebufferSizeChanged(m_frame.width(), m_frame.height());
315 resize(width(), height());
321 static QSize old_frame_size = QSize();
322 if ((y == 0 && x == 0) && (m_frame.size() != old_frame_size)) {
323 old_frame_size = m_frame.size();
324 kDebug(5011) << "Updating framebuffer size";
326 emit framebufferSizeChanged(m_frame.width(), m_frame.height());
330 repaint(qRound(m_x * m_horizontalFactor), qRound(m_y * m_verticalFactor), qRound(m_w * m_horizontalFactor), qRound(m_h * m_verticalFactor));
334 void VncView::setViewOnly(bool viewOnly)
336 RemoteView::setViewOnly(viewOnly);
338 m_dontSendClipboard = viewOnly;
341 setCursor(Qt::ArrowCursor);
343 setCursor(m_dotCursorState == CursorOn ? localDotCursor() : Qt::BlankCursor);
346 void VncView::showDotCursor(DotCursorState state)
348 RemoteView::showDotCursor(state);
350 setCursor(state == CursorOn ? localDotCursor() : Qt::BlankCursor);
353 //level should be in [0, 100]
354 void VncView::setZoomLevel(int level)
356 Q_ASSERT(parentWidget() != 0);
358 if(level == -1) { //handle resize
359 resize(m_frame.width()*m_horizontalFactor, m_frame.height()*m_verticalFactor);
363 double magnification;
366 } else if(level >= 90) {
369 const double min_horiz_magnification = double(parentWidget()->width())/m_frame.width();
370 const double min_vert_magnification = double(parentWidget()->height())/m_frame.height();
371 const double fit_screen_magnification = qMin(min_horiz_magnification, min_vert_magnification);
373 //level=90 => magnification=1.0, level=0 => magnification=fit_screen_magnification
374 magnification = (level)/90.0*(1.0 - fit_screen_magnification) + fit_screen_magnification;
377 if(magnification < 0 //remote display smaller than local?
378 or magnification != magnification) //nan
381 m_verticalFactor = m_horizontalFactor = magnification;
382 resize(m_frame.width()*magnification, m_frame.height()*magnification);
385 void VncView::setCut(const QString &text)
387 m_dontSendClipboard = true;
388 m_clipboard->setText(text, QClipboard::Clipboard);
389 m_clipboard->setText(text, QClipboard::Selection);
390 m_dontSendClipboard = false;
393 void VncView::paintEvent(QPaintEvent *event)
395 //kDebug(5011) << "paint event: x: " << m_x << ", y: " << m_y << ", w: " << m_w << ", h: " << m_h;
396 if (m_frame.isNull() || m_frame.format() == QImage::Format_Invalid) {
397 kDebug(5011) << "no valid image to paint";
398 RemoteView::paintEvent(event);
404 QPainter painter(this);
406 Qt::TransformationMode transformation_mode = Qt::SmoothTransformation;
407 if( m_horizontalFactor >= 1.0 )
408 transformation_mode = Qt::FastTransformation;
410 if (m_repaint and !force_full_repaint) {
411 // kDebug(5011) << "normal repaint";
412 painter.drawImage(QRect(qRound(m_x*m_horizontalFactor), qRound(m_y*m_verticalFactor),
413 qRound(m_w*m_horizontalFactor), qRound(m_h*m_verticalFactor)),
414 m_frame.copy(m_x, m_y, m_w, m_h).scaled(qRound(m_w*m_horizontalFactor),
415 qRound(m_h*m_verticalFactor),
416 Qt::IgnoreAspectRatio, transformation_mode));
418 //kDebug(5011) << "resize repaint";
419 QRect rect = event->rect();
420 if (!force_full_repaint and (rect.width() != width() || rect.height() != height())) {
421 // kDebug(5011) << "Partial repaint";
422 const int sx = rect.x()/m_horizontalFactor;
423 const int sy = rect.y()/m_verticalFactor;
424 const int sw = rect.width()/m_horizontalFactor;
425 const int sh = rect.height()/m_verticalFactor;
426 painter.drawImage(rect,
427 m_frame.copy(sx, sy, sw, sh).scaled(rect.width(), rect.height(),
428 Qt::IgnoreAspectRatio, transformation_mode));
430 kDebug(5011) << "Full repaint" << width() << height() << m_frame.width() << m_frame.height();
431 painter.drawImage(QRect(0, 0, width(), height()),
432 m_frame.scaled(m_frame.width() * m_horizontalFactor, m_frame.height() * m_verticalFactor,
433 Qt::IgnoreAspectRatio, transformation_mode));
434 force_full_repaint = false;
438 //draw local cursor ourselves, normal mouse pointer doesn't deal with scrolling
439 if((m_dotCursorState == CursorOn) || m_forceLocalCursor) {
440 #if QT_VERSION >= 0x040500
441 painter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
443 //rectangle size includes 1px pen width
444 painter.drawRect(cursor_x*m_horizontalFactor - CURSOR_SIZE/2, cursor_y*m_verticalFactor - CURSOR_SIZE/2, CURSOR_SIZE-1, CURSOR_SIZE-1);
447 RemoteView::paintEvent(event);
450 void VncView::resizeEvent(QResizeEvent *event)
452 RemoteView::resizeEvent(event);
456 bool VncView::event(QEvent *event)
458 switch (event->type()) {
459 case QEvent::KeyPress:
460 case QEvent::KeyRelease:
461 // kDebug(5011) << "keyEvent";
462 keyEventHandler(static_cast<QKeyEvent*>(event));
465 case QEvent::MouseButtonDblClick:
466 case QEvent::MouseButtonPress:
467 case QEvent::MouseButtonRelease:
468 case QEvent::MouseMove:
469 // kDebug(5011) << "mouseEvent";
470 mouseEventHandler(static_cast<QMouseEvent*>(event));
474 // kDebug(5011) << "wheelEvent";
475 wheelEventHandler(static_cast<QWheelEvent*>(event));
478 case QEvent::WindowActivate: //input panel may have been closed, prevent IM from interfering with hardware keyboard
479 setAttribute(Qt::WA_InputMethodEnabled, false);
482 return RemoteView::event(event);
486 //call with e == 0 to flush held events
487 void VncView::mouseEventHandler(QMouseEvent *e)
489 static bool tap_detected = false;
490 static bool double_tap_detected = false;
491 static bool tap_drag_detected = false;
492 static QTime press_time;
493 static QTime up_time; //used for double clicks/tap&drag, for time after first tap
495 if(!e) { //flush held taps
497 m_buttonMask |= 0x01;
498 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
499 m_buttonMask &= 0xfe;
500 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
501 tap_detected = false;
502 } else if(double_tap_detected and press_time.elapsed() > TAP_PRESS_TIME) { //got tap + another press -> tap & drag
503 m_buttonMask |= 0x01;
504 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
505 double_tap_detected = false;
506 tap_drag_detected = true;
512 if(e->x() < 0 or e->y() < 0) { //QScrollArea tends to send invalid events sometimes...
517 cursor_x = qRound(e->x()/m_horizontalFactor);
518 cursor_y = qRound(e->y()/m_verticalFactor);
519 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask); // plain move event
521 if(!disable_tapping and e->button() == Qt::LeftButton) { //implement touchpad-like input for left button
522 if(e->type() == QEvent::MouseButtonPress or e->type() == QEvent::MouseButtonDblClick) {
524 if(tap_detected and up_time.elapsed() < DOUBLE_TAP_UP_TIME) {
525 tap_detected = false;
526 double_tap_detected = true;
528 QTimer::singleShot(TAP_PRESS_TIME, this, SLOT(mouseEventHandler()));
530 } else if(e->type() == QEvent::MouseButtonRelease) {
531 if(tap_drag_detected) {
532 m_buttonMask &= 0xfe;
533 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
534 tap_drag_detected = false;
535 } else if(double_tap_detected) { //double click
536 double_tap_detected = false;
538 m_buttonMask |= 0x01;
539 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
540 m_buttonMask &= 0xfe;
541 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
542 m_buttonMask |= 0x01;
543 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
544 m_buttonMask &= 0xfe;
545 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
546 } else if(press_time.elapsed() < TAP_PRESS_TIME) { //tap
549 QTimer::singleShot(DOUBLE_TAP_UP_TIME, this, SLOT(mouseEventHandler()));
553 } else { //middle or right button, send directly
554 if ((e->type() == QEvent::MouseButtonPress)) {
555 if (e->button() & Qt::MidButton)
556 m_buttonMask |= 0x02;
557 if (e->button() & Qt::RightButton)
558 m_buttonMask |= 0x04;
559 } else if (e->type() == QEvent::MouseButtonRelease) {
560 if (e->button() & Qt::MidButton)
561 m_buttonMask &= 0xfd;
562 if (e->button() & Qt::RightButton)
563 m_buttonMask &= 0xfb;
565 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
568 //prevent local cursor artifacts
569 static int old_cursor_x = cursor_x;
570 static int old_cursor_y = cursor_y;
571 if(((m_dotCursorState == CursorOn) || m_forceLocalCursor)
572 and (cursor_x != old_cursor_x or cursor_y != old_cursor_y)) {
573 //clear last position
574 repaint(old_cursor_x*m_horizontalFactor - CURSOR_SIZE/2, old_cursor_y*m_verticalFactor - CURSOR_SIZE/2, CURSOR_SIZE, CURSOR_SIZE);
575 //and refresh new one
576 repaint(cursor_x*m_horizontalFactor - CURSOR_SIZE/2, cursor_y*m_verticalFactor - CURSOR_SIZE/2, CURSOR_SIZE, CURSOR_SIZE);
578 old_cursor_x = cursor_x; old_cursor_y = cursor_y;
582 void VncView::wheelEventHandler(QWheelEvent *event)
585 if (event->delta() < 0)
590 const int x = qRound(event->x() / m_horizontalFactor);
591 const int y = qRound(event->y() / m_verticalFactor);
593 vncThread.mouseEvent(x, y, eb | m_buttonMask);
594 vncThread.mouseEvent(x, y, m_buttonMask);
597 void VncView::keyEventHandler(QKeyEvent *e)
599 // strip away autorepeating KeyRelease; see bug #206598
600 if (e->isAutoRepeat() && (e->type() == QEvent::KeyRelease)) {
604 // parts of this code are based on http://italc.sourcearchive.com/documentation/1.0.9.1/vncview_8cpp-source.html
605 rfbKeySym k = e->nativeVirtualKey();
607 // we do not handle Key_Backtab separately as the Shift-modifier
608 // is already enabled
609 if (e->key() == Qt::Key_Backtab) {
613 const bool pressed = (e->type() == QEvent::KeyPress);
616 //don't send ISO_Level3_Shift (would break things like Win+0-9)
617 //also enable IM so symbol key works
619 setAttribute(Qt::WA_InputMethodEnabled, pressed);
626 if (k == XK_Shift_L || k == XK_Control_L || k == XK_Meta_L || k == XK_Alt_L) {
629 } else if (m_mods.contains(k)) {
637 int current_zoom = -1;
638 if(e->key() == Qt::Key_F8)
639 current_zoom = left_zoom;
640 else if(e->key() == Qt::Key_F7)
641 current_zoom = right_zoom;
643 // kDebug(5011) << "got '" << e->text() << "'.";
644 vncThread.keyEvent(k, pressed);
646 kDebug(5011) << "nativeVirtualKey() for '" << e->text() << "' failed.";
650 if(current_zoom == -1)
653 //handle zoom buttons
654 if(current_zoom == 0) { //left click
656 m_buttonMask |= 0x01;
658 m_buttonMask &= 0xfe;
659 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
660 } else if(current_zoom == 1) { //right click
662 m_buttonMask |= 0x04;
664 m_buttonMask &= 0xfb;
665 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
666 } else if(current_zoom == 2) { //middle click
668 m_buttonMask |= 0x02;
670 m_buttonMask &= 0xfd;
671 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
672 } else if(current_zoom == 3 and pressed) { //wheel up
674 vncThread.mouseEvent(cursor_x, cursor_y, eb | m_buttonMask);
675 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
676 } else if(current_zoom == 4 and pressed) { //wheel down
678 vncThread.mouseEvent(cursor_x, cursor_y, eb | m_buttonMask);
679 vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
680 } else if(current_zoom == 5) { //page up
681 vncThread.keyEvent(0xff55, pressed);
682 } else if(current_zoom == 6) { //page down
683 vncThread.keyEvent(0xff56, pressed);
687 void VncView::unpressModifiers()
689 const QList<unsigned int> keys = m_mods.keys();
690 QList<unsigned int>::const_iterator it = keys.constBegin();
691 while (it != keys.end()) {
692 vncThread.keyEvent(*it, false);
698 void VncView::clipboardSelectionChanged()
700 if (m_status != Connected)
703 if (m_clipboard->ownsSelection() || m_dontSendClipboard)
706 const QString text = m_clipboard->text(QClipboard::Selection);
708 vncThread.clientCut(text);
711 void VncView::clipboardDataChanged()
713 if (m_status != Connected)
716 if (m_clipboard->ownsClipboard() || m_dontSendClipboard)
719 const QString text = m_clipboard->text(QClipboard::Clipboard);
721 vncThread.clientCut(text);
725 void VncView::sendKey(Qt::Key key)
727 //convert Qt::Key into x11 keysym
739 case Qt::Key_PageDown:
757 case Qt::Key_Backspace:
772 k = 0xffbe + int(key - Qt::Key_F1);
784 case Qt::MetaModifier:
788 case Qt::AltModifier:
791 case Qt::Key_Control:
792 case Qt::ControlModifier:
796 kDebug(5011) << "sendKey(): Unhandled Qt::Key value " << key;
800 if (k == XK_Shift_L || k == XK_Control_L || k == XK_Meta_L || k == XK_Alt_L || k == XK_Super_L) {
801 if (m_mods.contains(k)) { //release
803 vncThread.keyEvent(k, false);
806 vncThread.keyEvent(k, true);
808 } else { //normal key
809 vncThread.keyEvent(k, true);
810 vncThread.keyEvent(k, false);
814 void VncView::sendKeySequence(QKeySequence keys)
816 Q_ASSERT(keys.count() <= 1); //we can only handle a single combination
818 //to get at individual key presses, we split 'keys' into its components
820 for(int i = 0; ; i++) {
821 QString k = keys.toString().section('+', i, i);
824 //kDebug(5011) << "found key: " << k;
826 key_list.append(Qt::Key_Alt);
827 } else if(k == "Ctrl") {
828 key_list.append(Qt::Key_Control);
829 } else if(k == "Meta") {
830 key_list.append(Qt::Key_Meta);
832 key_list.append(QKeySequence(k)[0]);
836 for(int i = 0; i < key_list.count(); i++)
837 sendKey(Qt::Key(key_list.at(i)));
839 //release modifiers (everything before final key)
840 for(int i = key_list.count()-2; i >= 0; i--)
841 sendKey(Qt::Key(key_list.at(i)));
844 void VncView::reloadSettings()
847 left_zoom = settings.value("left_zoom", 0).toInt();
848 right_zoom = settings.value("right_zoom", 1).toInt();
849 disable_tapping = settings.value("disable_tapping", false).toBool();
851 bool always_show_local_cursor = settings.value("always_show_local_cursor", false).toBool();
852 if(always_show_local_cursor)
853 showDotCursor(CursorOn);
858 //convert commitString into keyevents
859 void VncView::inputMethodEvent(QInputMethodEvent *event)
861 //TODO handle replacements
862 //NOTE for the return key to work Qt needs to enable multiline input, which only works for Q(Plain)TextEdit
864 //kDebug(5011) << event->commitString() << "|" << event->preeditString() << "|" << event->replacementLength() << "|" << event->replacementStart();
865 QString letters = event->commitString();
866 for(int i = 0; i < letters.length(); i++) {
867 char k = letters.at(i).toLatin1(); //works with all 'normal' keys, not umlauts.
869 kDebug(5011) << "unhandled key";
872 vncThread.keyEvent(k, true);
873 vncThread.keyEvent(k, false);
878 #include "moc_vncview.cpp"