summaryrefslogtreecommitdiffstats
path: root/src/gui/embedded/qkbd_qws.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/embedded/qkbd_qws.h')
-rw-r--r--src/gui/embedded/qkbd_qws.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/gui/embedded/qkbd_qws.h b/src/gui/embedded/qkbd_qws.h
index b2725af..c9572c0 100644
--- a/src/gui/embedded/qkbd_qws.h
+++ b/src/gui/embedded/qkbd_qws.h
@@ -1,7 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -21,9 +20,10 @@
** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
+** package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
@@ -58,11 +58,33 @@ class Q_GUI_EXPORT QWSKeyboardHandler
{
public:
QWSKeyboardHandler();
+ QWSKeyboardHandler(const QString &device);
virtual ~QWSKeyboardHandler();
virtual void processKeyEvent(int unicode, int keycode, Qt::KeyboardModifiers modifiers,
bool isPress, bool autoRepeat);
+ enum KeycodeAction {
+ None = 0,
+
+ CapsLockOff = 0x01000000,
+ CapsLockOn = 0x01000001,
+ NumLockOff = 0x02000000,
+ NumLockOn = 0x02000001,
+ ScrollLockOff = 0x03000000,
+ ScrollLockOn = 0x03000001,
+
+ Reboot = 0x04000000,
+
+ PreviousConsole = 0x05000000,
+ NextConsole = 0x05000001,
+ SwitchConsoleFirst = 0x06000000,
+ SwitchConsoleLast = 0x0600007f,
+ SwitchConsoleMask = 0x0000007f,
+ };
+
+ KeycodeAction processKeycode(quint16 keycode, bool pressed, bool autorepeat);
+
protected:
int transformDirKey(int key);
void beginAutoRepeat(int uni, int code, Qt::KeyboardModifiers mod);