diff -Nurp qtbase-everywhere-src-5.10.1-old/include/QtPlatformHeaders/headers.pri qtbase-everywhere-src-5.10.1-new/include/QtPlatformHeaders/headers.pri
--- qtbase-everywhere-src-5.10.1-old/include/QtPlatformHeaders/headers.pri	2018-02-10 00:49:55.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/include/QtPlatformHeaders/headers.pri	2018-12-07 20:02:23.000000000 +0300
@@ -1,8 +1,8 @@
-SYNCQT.HEADER_FILES = cocoafunctions/qcocoawindowfunctions.h eglfsfunctions/qeglfsfunctions.h helper/qplatformheaderhelper.h nativecontexts/qcocoanativecontext.h nativecontexts/qeglnativecontext.h nativecontexts/qglxnativecontext.h nativecontexts/qwglnativecontext.h waylandfunctions/qwaylandwindowfunctions.h windowsfunctions/qwindowswindowfunctions.h xcbfunctions/qxcbintegrationfunctions.h xcbfunctions/qxcbscreenfunctions.h xcbfunctions/qxcbwindowfunctions.h ../../include/QtPlatformHeaders/qtplatformheadersversion.h ../../include/QtPlatformHeaders/QtPlatformHeaders 
+SYNCQT.HEADER_FILES = cocoafunctions/qcocoawindowfunctions.h eglfsfunctions/qeglfsfunctions.h linuxfbfunctions/qlinuxfbfunctions.h helper/qplatformheaderhelper.h nativecontexts/qcocoanativecontext.h nativecontexts/qeglnativecontext.h nativecontexts/qglxnativecontext.h nativecontexts/qwglnativecontext.h waylandfunctions/qwaylandwindowfunctions.h windowsfunctions/qwindowswindowfunctions.h xcbfunctions/qxcbintegrationfunctions.h xcbfunctions/qxcbscreenfunctions.h xcbfunctions/qxcbwindowfunctions.h ../../include/QtPlatformHeaders/qtplatformheadersversion.h ../../include/QtPlatformHeaders/QtPlatformHeaders 
 SYNCQT.INJECTED_HEADER_FILES = 
-SYNCQT.HEADER_CLASSES = ../../include/QtPlatformHeaders/QCocoaWindowFunctions ../../include/QtPlatformHeaders/QEglFSFunctions ../../include/QtPlatformHeaders/QPlatformHeaderHelper ../../include/QtPlatformHeaders/QCocoaNativeContext ../../include/QtPlatformHeaders/QEGLNativeContext ../../include/QtPlatformHeaders/QGLXNativeContext ../../include/QtPlatformHeaders/QWGLNativeContext ../../include/QtPlatformHeaders/QWaylandWindowFunctions ../../include/QtPlatformHeaders/QWindowsWindowFunctions ../../include/QtPlatformHeaders/QXcbIntegrationFunctions ../../include/QtPlatformHeaders/QXcbScreenFunctions ../../include/QtPlatformHeaders/QXcbWindowFunctions ../../include/QtPlatformHeaders/QtPlatformHeadersVersion 
+SYNCQT.HEADER_CLASSES = ../../include/QtPlatformHeaders/QCocoaWindowFunctions ../../include/QtPlatformHeaders/QEglFSFunctions ../../include/QtPlatformHeaders/QLinuxFbFunctions ../../include/QtPlatformHeaders/QPlatformHeaderHelper ../../include/QtPlatformHeaders/QCocoaNativeContext ../../include/QtPlatformHeaders/QEGLNativeContext ../../include/QtPlatformHeaders/QGLXNativeContext ../../include/QtPlatformHeaders/QWGLNativeContext ../../include/QtPlatformHeaders/QWaylandWindowFunctions ../../include/QtPlatformHeaders/QWindowsWindowFunctions ../../include/QtPlatformHeaders/QXcbIntegrationFunctions ../../include/QtPlatformHeaders/QXcbScreenFunctions ../../include/QtPlatformHeaders/QXcbWindowFunctions ../../include/QtPlatformHeaders/QtPlatformHeadersVersion 
 SYNCQT.PRIVATE_HEADER_FILES = 
 SYNCQT.INJECTED_PRIVATE_HEADER_FILES = 
 SYNCQT.QPA_HEADER_FILES = 
-SYNCQT.CLEAN_HEADER_FILES = cocoafunctions/qcocoawindowfunctions.h eglfsfunctions/qeglfsfunctions.h helper/qplatformheaderhelper.h nativecontexts/qcocoanativecontext.h nativecontexts/qeglnativecontext.h nativecontexts/qglxnativecontext.h nativecontexts/qwglnativecontext.h waylandfunctions/qwaylandwindowfunctions.h windowsfunctions/qwindowswindowfunctions.h xcbfunctions/qxcbintegrationfunctions.h xcbfunctions/qxcbscreenfunctions.h xcbfunctions/qxcbwindowfunctions.h 
+SYNCQT.CLEAN_HEADER_FILES = cocoafunctions/qcocoawindowfunctions.h eglfsfunctions/qeglfsfunctions.h linuxfbfunctions/qlinuxfbfunctions.h helper/qplatformheaderhelper.h nativecontexts/qcocoanativecontext.h nativecontexts/qeglnativecontext.h nativecontexts/qglxnativecontext.h nativecontexts/qwglnativecontext.h waylandfunctions/qwaylandwindowfunctions.h windowsfunctions/qwindowswindowfunctions.h xcbfunctions/qxcbintegrationfunctions.h xcbfunctions/qxcbscreenfunctions.h xcbfunctions/qxcbwindowfunctions.h
 SYNCQT.INJECTIONS = 
diff -Nurp qtbase-everywhere-src-5.10.1-old/include/QtPlatformHeaders/QLinuxFbFunctions qtbase-everywhere-src-5.10.1-new/include/QtPlatformHeaders/QLinuxFbFunctions
--- qtbase-everywhere-src-5.10.1-old/include/QtPlatformHeaders/QLinuxFbFunctions	1970-01-01 03:00:00.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/include/QtPlatformHeaders/QLinuxFbFunctions	2018-12-07 19:08:50.000000000 +0300
@@ -0,0 +1 @@
+#include "qlinuxfbfunctions.h"
diff -Nurp qtbase-everywhere-src-5.10.1-old/include/QtPlatformHeaders/qlinuxfbfunctions.h qtbase-everywhere-src-5.10.1-new/include/QtPlatformHeaders/qlinuxfbfunctions.h
--- qtbase-everywhere-src-5.10.1-old/include/QtPlatformHeaders/qlinuxfbfunctions.h	1970-01-01 03:00:00.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/include/QtPlatformHeaders/qlinuxfbfunctions.h	2018-12-07 19:41:43.000000000 +0300
@@ -0,0 +1 @@
+#include "../../src/platformheaders/linuxfbfunctions/qlinuxfbfunctions.h"
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/platformheaders/eglfsfunctions/qeglfsfunctions.h qtbase-everywhere-src-5.10.1-new/src/platformheaders/eglfsfunctions/qeglfsfunctions.h
--- qtbase-everywhere-src-5.10.1-old/src/platformheaders/eglfsfunctions/qeglfsfunctions.h	2018-02-08 21:24:48.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/platformheaders/eglfsfunctions/qeglfsfunctions.h	2018-12-07 17:46:22.000000000 +0300
@@ -49,7 +49,9 @@ class QEglFSFunctions
 {
 public:
     typedef void (*LoadKeymapType)(const QString &filename);
+    typedef void (*SwitchLangType)();
     static QByteArray loadKeymapTypeIdentifier() { return QByteArrayLiteral("EglFSLoadKeymap"); }
+    static QByteArray switchLangTypeIdentifier() { return QByteArrayLiteral("EglFSSwitchLang"); }
 
     static void loadKeymap(const QString &filename)
     {
@@ -57,6 +59,13 @@ public:
         if (func)
             func(filename);
     }
+
+    static void switchLang()
+    {
+        SwitchLangType func = reinterpret_cast<SwitchLangType>(QGuiApplication::platformFunction(switchLangTypeIdentifier()));
+        if (func)
+            func();
+    }
 };
 
 
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/platformheaders/linuxfbfunctions/linuxfbfunctions.pri qtbase-everywhere-src-5.10.1-new/src/platformheaders/linuxfbfunctions/linuxfbfunctions.pri
--- qtbase-everywhere-src-5.10.1-old/src/platformheaders/linuxfbfunctions/linuxfbfunctions.pri	1970-01-01 03:00:00.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/platformheaders/linuxfbfunctions/linuxfbfunctions.pri	2018-12-07 18:34:03.000000000 +0300
@@ -0,0 +1 @@
+HEADERS += $$PWD/qlinuxfbfunctions.h
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/platformheaders/linuxfbfunctions/qlinuxfbfunctions.h qtbase-everywhere-src-5.10.1-new/src/platformheaders/linuxfbfunctions/qlinuxfbfunctions.h
--- qtbase-everywhere-src-5.10.1-old/src/platformheaders/linuxfbfunctions/qlinuxfbfunctions.h	1970-01-01 03:00:00.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/platformheaders/linuxfbfunctions/qlinuxfbfunctions.h	2018-12-10 16:14:59.000000000 +0300
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QLINUXFBFUNCTIONS_H
+#define QLINUXFBFUNCTIONS_H
+
+#include <QtCore/QByteArray>
+#include <QtGui/QGuiApplication>
+
+QT_BEGIN_NAMESPACE
+
+class QLinuxFbFunctions
+{
+public:
+    typedef void (*LoadKeymapType)(const QString &filename);
+    typedef void (*SwitchLangType)();
+    static QByteArray loadKeymapTypeIdentifier() { return QByteArrayLiteral("LinuxFbLoadKeymap"); }
+    static QByteArray switchLangTypeIdentifier() { return QByteArrayLiteral("LinuxFbSwitchLang"); }
+
+    static void loadKeymap(const QString &filename)
+    {
+        LoadKeymapType func = reinterpret_cast<LoadKeymapType>(QGuiApplication::platformFunction(loadKeymapTypeIdentifier()));
+        if (func)
+            func(filename);
+    }
+
+    static void switchLang()
+    {
+        SwitchLangType func = reinterpret_cast<SwitchLangType>(QGuiApplication::platformFunction(switchLangTypeIdentifier()));
+        if (func)
+            func();
+    }
+};
+
+
+QT_END_NAMESPACE
+
+#endif // QLINUXFBFUNCTIONS_H
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/platformheaders/linuxfbfunctions/qlinuxfbfunctions.qdoc qtbase-everywhere-src-5.10.1-new/src/platformheaders/linuxfbfunctions/qlinuxfbfunctions.qdoc
--- qtbase-everywhere-src-5.10.1-old/src/platformheaders/linuxfbfunctions/qlinuxfbfunctions.qdoc	1970-01-01 03:00:00.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/platformheaders/linuxfbfunctions/qlinuxfbfunctions.qdoc	2018-12-07 18:58:58.000000000 +0300
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+    \class QLinuxFbFunctions
+    \inmodule QtPlatformHeaders
+
+    \brief The QLinuxFbFunctions class is an inline class containing
+    platform-specific functionality for the linuxfb platform plugin that is
+    typically used on systems running Embedded Linux or Android.
+
+    \note There is no binary compatibility guarantee for this class,
+    meaning that an application using it is only guaranteed to work with the Qt
+    version it was developed against.
+*/
+
+/*!
+    \typedef QLinuxFbFunctions::LoadKeymapType
+
+    Function type for loadKeymap.
+*/
+
+/*!
+    \fn QByteArray QLinuxFbFunctions::loadKeymapTypeIdentifier()
+
+    \return the identifier that can be passed to
+    QGuiApplication::platformFunction() to query the entry point for the
+    loadKeymap function implementation.
+*/
+
+/*!
+    \fn void QLinuxFbFunctions::loadKeymap(const QString &filename)
+
+    Loads and switches to the keymap from \a filename. When \a filename is
+    empty, the default keymap, which is either the built-on one or the keymap
+    given in the plugin specification, is restored.
+
+    \note This is functional only when the evdev keyboard support code is
+    compiled in to the platform plugin. When using external generic plugins via
+    the \c{-plugin} argument, or when the environment variable
+    \c{QT_QPA_FB_NO_LIBINPUT} is set or when building Qt without evdev
+    support, this function will have no effect.
+*/
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/platformheaders/platformheaders.pro qtbase-everywhere-src-5.10.1-new/src/platformheaders/platformheaders.pro
--- qtbase-everywhere-src-5.10.1-old/src/platformheaders/platformheaders.pro	2018-02-08 21:24:48.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/platformheaders/platformheaders.pro	2018-12-07 19:02:52.000000000 +0300
@@ -10,6 +10,7 @@ include(windowsfunctions/windowsfunction
 include(helper/helper.pri)
 include(cocoafunctions/cocoafunctions.pri)
 include(waylandfunctions/waylandfunctions.pri)
+include(linuxfbfunctions/linuxfbfunctions.pri)
 
 QMAKE_DOCS = $$PWD/doc/qtplatformheaders.qdocconf
 
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp qtbase-everywhere-src-5.10.1-new/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
--- qtbase-everywhere-src-5.10.1-old/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp	2018-02-08 21:24:48.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp	2018-12-10 17:16:35.706113532 +0300
@@ -76,7 +76,7 @@ void QFdContainer::reset() Q_DECL_NOTHRO
 QEvdevKeyboardHandler::QEvdevKeyboardHandler(const QString &device, QFdContainer &fd, bool disableZap, bool enableCompose, const QString &keymapFile)
     : m_device(device), m_fd(fd.release()), m_notify(Q_NULLPTR),
       m_modifiers(0), m_composing(0), m_dead_unicode(0xffff),
-      m_no_zap(disableZap), m_do_compose(enableCompose),
+      m_langLock(0), m_no_zap(disableZap), m_do_compose(enableCompose),
       m_keymap(0), m_keymap_size(0), m_keycompose(0), m_keycompose_size(0)
 {
     qCDebug(qLcEvdevKey) << "Create keyboard handler with for device" << device;
@@ -252,6 +252,8 @@ QEvdevKeyboardHandler::KeycodeAction QEv
             quint8 testmods = m_modifiers;
             if (m_locks[0] /*CapsLock*/ && (m->flags & QEvdevKeyboardMap::IsLetter))
                 testmods ^= QEvdevKeyboardMap::ModShift;
+            if (m_langLock)
+                testmods ^= QEvdevKeyboardMap::ModAltGr;
             if (m->modifiers == testmods)
                 map_withmod = m;
         }
@@ -569,4 +571,9 @@ bool QEvdevKeyboardHandler::loadKeymap(c
     return true;
 }
 
+void QEvdevKeyboardHandler::switchLang()
+{
+    m_langLock ^= 1;
+}
+
 QT_END_NAMESPACE
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h qtbase-everywhere-src-5.10.1-new/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h
--- qtbase-everywhere-src-5.10.1-old/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h	2018-02-08 21:24:48.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h	2018-12-07 17:35:42.000000000 +0300
@@ -192,6 +192,8 @@ public:
     void readKeycode();
     KeycodeAction processKeycode(quint16 keycode, bool pressed, bool autorepeat);
 
+    void switchLang();
+
 private:
     void processKeyEvent(int nativecode, int unicode, int qtcode,
                          Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat);
@@ -206,6 +208,7 @@ private:
     quint8 m_locks[3];
     int m_composing;
     quint16 m_dead_unicode;
+    quint8 m_langLock;
 
     bool m_no_zap;
     bool m_do_compose;
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp qtbase-everywhere-src-5.10.1-new/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp
--- qtbase-everywhere-src-5.10.1-old/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp	2018-02-08 21:24:48.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp	2018-12-07 17:50:09.000000000 +0300
@@ -153,4 +153,10 @@ void QEvdevKeyboardManager::loadKeymap(c
     }
 }
 
+void QEvdevKeyboardManager::switchLang()
+{
+    foreach (QEvdevKeyboardHandler *handler, m_keyboards)
+        handler->switchLang();
+}
+
 QT_END_NAMESPACE
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h qtbase-everywhere-src-5.10.1-new/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h
--- qtbase-everywhere-src-5.10.1-old/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h	2018-02-08 21:24:48.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h	2018-12-07 17:47:19.000000000 +0300
@@ -68,6 +68,7 @@ public:
     ~QEvdevKeyboardManager();
 
     void loadKeymap(const QString &file);
+    void switchLang();
 
     void addKeyboard(const QString &deviceNode = QString());
     void removeKeyboard(const QString &deviceNode);
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp qtbase-everywhere-src-5.10.1-new/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
--- qtbase-everywhere-src-5.10.1-old/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp	2018-02-08 21:24:48.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp	2018-12-10 17:23:05.424109319 +0300
@@ -427,6 +427,8 @@ QFunctionPointer QEglFSIntegration::plat
 #if QT_CONFIG(evdev)
     if (function == QEglFSFunctions::loadKeymapTypeIdentifier())
         return QFunctionPointer(loadKeymapStatic);
+    else if (function == QEglFSFunctions::switchLangTypeIdentifier())
+        return QFunctionPointer(switchLangStatic);
 #else
     Q_UNUSED(function)
 #endif
@@ -445,6 +447,19 @@ void QEglFSIntegration::loadKeymapStatic
 #else
     Q_UNUSED(filename);
 #endif
+}
+
+void QEglFSIntegration::switchLangStatic()
+{
+#if QT_CONFIG(evdev)
+    QEglFSIntegration *self = static_cast<QEglFSIntegration *>(QGuiApplicationPrivate::platformIntegration());
+    if (self->m_kbdMgr)
+        self->m_kbdMgr->switchLang();
+    else
+        qWarning("QEglFSIntegration: Cannot switch language, no keyboard handler found");
+#else
+    Q_UNUSED(filename);
+#endif
 }
 
 void QEglFSIntegration::createInputHandlers()
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h qtbase-everywhere-src-5.10.1-new/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h
--- qtbase-everywhere-src-5.10.1-old/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h	2018-02-08 21:24:48.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h	2018-12-10 17:06:51.022119852 +0300
@@ -110,6 +110,7 @@ private:
     EGLNativeDisplayType nativeDisplay() const;
     void createInputHandlers();
     static void loadKeymapStatic(const QString &filename);
+    static void switchLangStatic();
 
     EGLDisplay m_display;
     QPlatformInputContext *m_inputContext;
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp qtbase-everywhere-src-5.10.1-new/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
--- qtbase-everywhere-src-5.10.1-old/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp	2018-02-08 21:24:48.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp	2018-12-10 17:23:22.775109132 +0300
@@ -69,12 +69,15 @@
 #include <QtInputSupport/private/qtslib_p.h>
 #endif
 
+#include <QtPlatformHeaders/qlinuxfbfunctions.h>
+
 QT_BEGIN_NAMESPACE
 
 QLinuxFbIntegration::QLinuxFbIntegration(const QStringList &paramList)
     : m_primaryScreen(nullptr),
       m_fontDb(new QGenericUnixFontDatabase),
-      m_services(new QGenericUnixServices)
+      m_services(new QGenericUnixServices),
+      m_kbdMgr(0)
 {
 #if QT_CONFIG(kms)
     if (qEnvironmentVariableIntValue("QT_QPA_FB_DRM") != 0)
@@ -98,7 +101,7 @@ void QLinuxFbIntegration::initialize()
 
     m_inputContext = QPlatformInputContextFactory::create();
 
-    m_nativeInterface.reset(new QPlatformNativeInterface);
+    //m_nativeInterface.reset(new QPlatformNativeInterface);
 
     m_vtHandler.reset(new QFbVtHandler);
 
@@ -163,7 +166,7 @@ void QLinuxFbIntegration::createInputHan
 #endif
 
 #if QT_CONFIG(evdev)
-    new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString(), this);
+    m_kbdMgr = new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString(), this);
     new QEvdevMouseManager(QLatin1String("EvdevMouse"), QString(), this);
 #if QT_CONFIG(tslib)
     if (!useTslib)
@@ -174,7 +177,48 @@ void QLinuxFbIntegration::createInputHan
 
 QPlatformNativeInterface *QLinuxFbIntegration::nativeInterface() const
 {
-    return m_nativeInterface.data();
+    //return m_nativeInterface.data();
+    return const_cast<QLinuxFbIntegration *>(this);
+}
+
+QFunctionPointer QLinuxFbIntegration::platformFunction(const QByteArray &function) const
+{
+#if QT_CONFIG(evdev)
+    if (function == QLinuxFbFunctions::loadKeymapTypeIdentifier())
+        return QFunctionPointer(loadKeymapStatic);
+    else if (function == QLinuxFbFunctions::switchLangTypeIdentifier())
+        return QFunctionPointer(switchLangStatic);
+#else
+    Q_UNUSED(function)
+#endif
+
+    return 0;
+}
+
+void QLinuxFbIntegration::loadKeymapStatic(const QString &filename)
+{
+#if QT_CONFIG(evdev)
+    QLinuxFbIntegration *self = static_cast<QLinuxFbIntegration *>(QGuiApplicationPrivate::platformIntegration());
+    if (self->m_kbdMgr)
+        self->m_kbdMgr->loadKeymap(filename);
+    else
+        qWarning("QLinuxFbIntegration: Cannot load keymap, no keyboard handler found");
+#else
+    Q_UNUSED(filename);
+#endif
+}
+
+void QLinuxFbIntegration::switchLangStatic()
+{
+#if QT_CONFIG(evdev)
+    QLinuxFbIntegration *self = static_cast<QLinuxFbIntegration *>(QGuiApplicationPrivate::platformIntegration());
+    if (self->m_kbdMgr)
+        self->m_kbdMgr->switchLang();
+    else
+        qWarning("QLinuxFbIntegration: Cannot switch language, no keyboard handler found");
+#else
+    Q_UNUSED(filename);
+#endif
 }
 
 QT_END_NAMESPACE
diff -Nurp qtbase-everywhere-src-5.10.1-old/src/plugins/platforms/linuxfb/qlinuxfbintegration.h qtbase-everywhere-src-5.10.1-new/src/plugins/platforms/linuxfb/qlinuxfbintegration.h
--- qtbase-everywhere-src-5.10.1-old/src/plugins/platforms/linuxfb/qlinuxfbintegration.h	2018-02-08 21:24:48.000000000 +0300
+++ qtbase-everywhere-src-5.10.1-new/src/plugins/platforms/linuxfb/qlinuxfbintegration.h	2018-12-10 15:35:47.000000000 +0300
@@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE
 class QAbstractEventDispatcher;
 class QFbScreen;
 class QFbVtHandler;
+class QEvdevKeyboardManager;
 
 class QLinuxFbIntegration : public QPlatformIntegration, public QPlatformNativeInterface
 {
@@ -71,15 +72,21 @@ public:
 
     QList<QPlatformScreen *> screens() const;
 
+    QFunctionPointer platformFunction(const QByteArray &function) const Q_DECL_OVERRIDE;
+
 private:
     void createInputHandlers();
+    static void loadKeymapStatic(const QString &filename);
+    static void switchLangStatic();
 
     QFbScreen *m_primaryScreen;
     QPlatformInputContext *m_inputContext;
     QScopedPointer<QPlatformFontDatabase> m_fontDb;
     QScopedPointer<QPlatformServices> m_services;
     QScopedPointer<QFbVtHandler> m_vtHandler;
-    QScopedPointer<QPlatformNativeInterface> m_nativeInterface;
+    //QScopedPointer<QPlatformNativeInterface> m_nativeInterface;
+
+    QEvdevKeyboardManager *m_kbdMgr;
 };
 
 QT_END_NAMESPACE
