fix symbol key
authorchristian <christian@christian-laptop.(none)>
Wed, 15 Sep 2010 20:34:25 +0000 (22:34 +0200)
committerchristian <christian@christian-laptop.(none)>
Wed, 15 Sep 2010 20:34:25 +0000 (22:34 +0200)
debian/changelog
src/mainwindow.cpp
src/vncview.cpp

index 7585e84..92af072 100644 (file)
@@ -1,6 +1,7 @@
 presencevnc (0.5) unstable; urgency=low
 
   * Add "..." menu for additional keys 
+  * Symbol key (Fn+Ctrl) fixed
 
  -- Christian Pulvermacher <pulvermacher@gmx.de>  Fri, 27 Aug 2010 19:09:29 +0200
 
index 7f8e832..385e1a2 100644 (file)
@@ -282,9 +282,12 @@ void MainWindow::forceResizeDelayed()
 void MainWindow::toggleFullscreen()
 {
        bool in_fullscreen = windowState() & Qt::WindowFullScreen;
+
        //hide menu/toolbar in fullscreen (new state is !in_fullscreen)
        toolbar->setVisible(show_toolbar->isChecked() and in_fullscreen);
+
 #ifndef Q_WS_MAEMO_5
+       //menu bar is invisible by default on maemo
        menuBar()->setVisible(in_fullscreen);
 #endif
 
@@ -334,6 +337,7 @@ void MainWindow::showInputPanel()
 {
 #ifdef Q_WS_MAEMO_5
        vnc_view->setAttribute(Qt::WA_InputMethodEnabled, true);
+
        QEvent event(QEvent::RequestSoftwareInputPanel);
        QApplication::sendEvent(vnc_view, &event);
 #endif
index afe6f5f..94c0f61 100644 (file)
@@ -633,6 +633,16 @@ void VncView::keyEventHandler(QKeyEvent *e)
 
     const bool pressed = (e->type() == QEvent::KeyPress);
 
+#ifdef Q_WS_MAEMO_5
+    //don't send ISO_Level3_Shift (would break things like Win+0-9)
+    //also enable IM so symbol key works
+    if(k == 0xfe03) {
+           setAttribute(Qt::WA_InputMethodEnabled, pressed);
+           e->ignore();
+           return;
+    }
+#endif
+
     // handle modifiers
     if (k == XK_Shift_L || k == XK_Control_L || k == XK_Meta_L || k == XK_Alt_L) {
         if (pressed) {