]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/controllerwidget.cpp
Made keyboard handling a bit more sane.
[virtualjaguar] / src / gui / controllerwidget.cpp
index 0386334a92846cfc21e781c808b21f858101227e..ca27cb5cb360b90dc3da33b3041bf0b056314c73 100644 (file)
@@ -19,8 +19,8 @@
 #include "keygrabber.h"
 
 
-// These tables are used to convert Qt keycodes into human readable form. Note that
-// a lot of these are just filler.
+// These tables are used to convert Qt keycodes into human readable form. Note
+// that a lot of these are just filler.
 char ControllerWidget::keyName1[96][16] = {
        "Space",
        "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/",
@@ -65,6 +65,8 @@ ControllerWidget::ControllerWidget(QWidget * parent/*= 0*/): QWidget(parent),
        widgetSize += QSize(4, 4);
        // We want to know when the mouse is moving over our widget...
        setMouseTracking(true);
+//nope
+//setFixedSize(widgetSize);
 }
 
 
@@ -180,7 +182,10 @@ void ControllerWidget::mouseReleaseEvent(QMouseEvent * /*event*/)
        int key = keyGrab.key;
 
        if (key != Qt::Key_Escape)
+       {
                keys[keyToHighlightSave] = key;
+               emit(KeyDefined(keyToHighlightSave, key));
+       }
 
        keyToHighlight = keyToHighlightSave;
        update();