From 186354ee513b13dafa77978cb4c10321950600de Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 17 Jun 2014 12:28:15 +0200 Subject: Add a way to access loadKeymap on eglfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ChangeLog][QtGui] Keymaps are now changeable at runtime when using eglfs Task-number: QTBUG-39583 Change-Id: I93480da72c1d1d1db1914298fe624cae02b0b2d0 Reviewed-by: Jørgen Lind Reviewed-by: Will Wagner --- .../input/evdevkeyboard/qevdevkeyboardhandler_p.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h') diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h index 1065b05d51..164b1c3863 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h @@ -145,7 +145,9 @@ public: SwitchConsoleMask = 0x0000007f }; - static QEvdevKeyboardHandler *create(const QString &device, const QString &specification); + static QEvdevKeyboardHandler *create(const QString &device, + const QString &specification, + const QString &defaultKeymapFile = QString()); static Qt::KeyboardModifiers toQtModifiers(quint8 mod) { @@ -161,13 +163,14 @@ public: return qtmod; } + bool loadKeymap(const QString &file); + void unloadKeymap(); + private slots: void readKeycode(); KeycodeAction processKeycode(quint16 keycode, bool pressed, bool autorepeat); private: - void unloadKeymap(); - bool loadKeymap(const QString &file); void processKeyEvent(int nativecode, int unicode, int qtcode, Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat); void switchLed(int, bool); -- cgit v1.2.3