handle xcb/xkb
[projets/fookb-qt.git] / fookb.cpp
index 75e0ade49dc45ebb70f83b9ca5913c681cc9e9cc..3ba015c62eac143abfa495732181a30c9a56eeca 100644 (file)
--- a/fookb.cpp
+++ b/fookb.cpp
@@ -1,11 +1,21 @@
 #include <QApplication>
 #include <QQmlApplicationEngine>
+#include <QDebug>
+
+#include "xcbEventFilter.h"
 
 int main(int argc, char *argv[])
 {
+    /* create qapp and QML engine */
     QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
     QApplication app(argc, argv);
     QQmlApplicationEngine engine;
     engine.load(QUrl(QStringLiteral("qrc:/fookb.qml")));
+
+    /* Install event filter to handle mapping change */
+    XcbEventFilter eventFilter;
+    app.installNativeEventFilter(&eventFilter);
+
+    /* run application */
     return app.exec();
 }