summaryrefslogtreecommitdiffstats
path: root/src/gui/embedded/qkbdlinuxinput_qws.h
diff options
context:
space:
mode:
authorRobert Griebl <rgriebl@trolltech.com>2009-03-03 17:36:58 (GMT)
committerRobert Griebl <rgriebl@trolltech.com>2009-04-02 19:21:57 (GMT)
commit3f51c30f030a5517273a62bdd48dfe96c98852ee (patch)
treeaa40f43a4d2d0b8e68b8b4ebbd86113bc8bc4f60 /src/gui/embedded/qkbdlinuxinput_qws.h
parent86723ca856dbd07bc7809ed9c3f9a219a99e67bd (diff)
downloadQt-3f51c30f030a5517273a62bdd48dfe96c98852ee.zip
Qt-3f51c30f030a5517273a62bdd48dfe96c98852ee.tar.gz
Qt-3f51c30f030a5517273a62bdd48dfe96c98852ee.tar.bz2
Keymap support for QWS.
This patch adds support for keymaps to the QWSKeyboardHandler. The keymaps can be generated by the kmap2qmap tool (see tools/ directory). The source keymaps can be standard Linux .kmap files. Changes to Qt: * completely refactored the Tty and Usb (now known as LinuxInput) handlers * removed the LinuxIS plugin (handled by LinuxInput now) * removed support for iPAQ, EBX and Zylonite keypads (obsolete hardware) * removed support for RAW tty mode. This could be re-added, for non-Linux systems by implementing a PC/AT scan-code to Linux keycode converter. New features for Tty and LinuxInput (ex Usb) handlers: * support for keymaps QWS_KEYBOARD=..:keymap=/path/to/x.qmap:.. * support for dead keys and the compose key * support for lock LEDs * support for key repeat rates (in ms): QWS_KEYBOARD=..:repeat-delay=x:repear-rate=y:.. * the default keymap supports latin1 composing via AltGr: QWS_KEYBOARD=..:enable-compose:.. * ctrl+alt+backspace application zapping can be disabled: QWS_KEYBOARD=..:disable-zap:.. * added virtual filter functions to both the Tty and the LinuxInput handlers. (QWSKeyboardHandler::processKeycode should be virtual in the first place, but that would be BIC) Still missing: * extended documentation for QWS_KEYBOARD Reviewed-By: Paul Olav Tvete Reviewed-By: Harald Fernengel
Diffstat (limited to 'src/gui/embedded/qkbdlinuxinput_qws.h')
-rw-r--r--src/gui/embedded/qkbdlinuxinput_qws.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/gui/embedded/qkbdlinuxinput_qws.h b/src/gui/embedded/qkbdlinuxinput_qws.h
new file mode 100644
index 0000000..5fa8214
--- /dev/null
+++ b/src/gui/embedded/qkbdlinuxinput_qws.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QKBDLINUXINPUT_QWS_H
+#define QKBDLINUXINPUT_QWS_H
+
+#include <QtGui/qkbd_qws.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+#ifndef QT_NO_QWS_KEYBOARD
+
+#ifndef QT_NO_QWS_KBD_LINUXINPUT
+
+class QWSLinuxInputKbPrivate;
+
+class QWSLinuxInputKeyboardHandler : public QWSKeyboardHandler
+{
+public:
+ QWSLinuxInputKeyboardHandler(const QString&);
+ virtual ~QWSLinuxInputKeyboardHandler();
+
+ virtual bool filterInputEvent(quint16 &input_code, qint32 &input_value);
+
+private:
+ QWSLinuxInputKbPrivate *d;
+};
+
+#endif // QT_NO_QWS_KBD_LINUXINPUT
+
+#endif // QT_NO_QWS_KEYBOARD
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QKBDLINUXINPUT_QWS_H