Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

QWSKeyboardHandler Class Reference
[QtGui module]

The QWSKeyboardHandler class implements the keyboard driver for Qtopia Core. More...

#include <QWSKeyboardHandler>

Public Functions

Protected Functions


Detailed Description

The QWSKeyboardHandler class implements the keyboard driver for Qtopia Core.

The keyboard driver handles events from system devices and generates key events.

A QWSKeyboardHandler will usually open some system device in its constructor, create a QSocketNotifier on that opened device and when it receives data, it will call processKeyEvent() to send the event to Qtopia Core for relaying to clients.


Member Function Documentation

QWSKeyboardHandler::QWSKeyboardHandler ()

Constructs a keyboard handler. The handler may be passed to the system for later destruction with QWSServer::setKeyboardHandler(), although even without doing this, the handler can function, calling processKeyEvent() to emit events.

QWSKeyboardHandler::~QWSKeyboardHandler ()   [virtual]

Destroys a keyboard handler. Note that if you have called QWSServer::setKeyboardHandler(), you must not delete the handler.

void QWSKeyboardHandler::beginAutoRepeat ( int uni, int code, Qt::KeyboardModifiers mod )   [protected]

Begin auto repeating the specified key press. After a short delay the key sequence will be sent periodically until endAutoRepeat() is called.

uni is the unicode value, code is the keycode and mod is the modifier state of the key sequence.

See also endAutoRepeat().

void QWSKeyboardHandler::endAutoRepeat ()   [protected]

Stop auto-repeating a key press.

See also beginAutoRepeat().

void QWSKeyboardHandler::processKeyEvent ( int unicode, int keycode, Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat )   [virtual]

Subclasses call this function to send a key event. The server may additionally filter the event before sending it on to applications.

ParameterMeaning
unicodeThe Unicode value for the key, or 0xFFFF is none is appropriate.
keycodeThe Qt keycode for the key (see Qt::Key for the list of codes).
modifiersThe set of modifier keys (see Qt::Modifier).
isPressWhether this is a press or a release.
autoRepeatWhether this event was generated by an auto-repeat mechanism, or an actual key press.

int QWSKeyboardHandler::transformDirKey ( int key )   [protected]

Transforms an arrow key with keycode key (Qt::Key_Left, Qt::Key_Up, Qt::Key_Right, Qt::Key_Down) to the orientation of the display and returns the transformed keycode.


Copyright © 2005 Trolltech Trademarks
Qt 4.1.0
Hosted by uCoz