Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QtopiaInputEvents Class Reference
[QtBaseModule]

The QtopiaInputEvents class provides functions to simulate and access input events. More...

    #include <QtopiaInputEvents>

Static Public Members


Detailed Description

The QtopiaInputEvents class provides functions to simulate and access input events.

The server calls sendKeyEvent() whenever it wishes to simulate a key event.

This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.


Member Function Documentation

void QtopiaInputEvents::addKeyboardFilter ( QtopiaKeyboardFilter * filter )   [static]

Adds the given keyboard filter to key events sent to Qtopia.

Note the filter is not invoked for keys generated by virtual keyboards, but only for the physical keys on the device.

See also removeKeyboardFilter().

void QtopiaInputEvents::openKeyboard ()   [static]

Opens the keyboard devices specified by the QWS_KEYBOARD environment variable.

void QtopiaInputEvents::openMouse ()   [static]

Opens the mouse devices specified by the QWS_MOUSE_PROTO environment variable.

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

Processes the given key event. The key is identified by its unicode value and the given keycode, modifiers, isPress and autoRepeat parameters.

The keycode parameter is the Qt keycode value as defined by the Qt::Key enum. The modifiers is an OR combination of Qt::KeyboardModifier values, indicating whether Shift/Alt/Ctrl keys are pressed. The isPress parameter is true if the event is a key press event and autoRepeat is true if the event is caused by an auto-repeat mechanism and not an actual key press.

This function is typically called internally by keyboard drivers.

See also sendKeyEvent().

void QtopiaInputEvents::removeKeyboardFilter ()   [static]

Removes and deletes the most recently added filter.

Note that the programmer is responsible for removing each added keyboard filter.

void QtopiaInputEvents::resumeMouse ()   [static]

Resumes pointer handling by reactivating all the mouse drivers registered by the QWS_MOUSE_PROTO environment variable.

See also suspendMouse().

void QtopiaInputEvents::sendKeyEvent ( int unicode, int keycode, Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat )   [static]

Sends the given key event. The key is identified by its unicode value and the given keycode, modifiers, isPress and autoRepeat parameters.

Use this function to send key events generated by "virtual keyboards" (note that the processKeyEvent() function is impelemented using this function).

The keycode parameter is the Qt keycode value as defined by the Qt::Key enum. The modifiers is an OR combination of Qt::KeyboardModifier values, indicating whether Shift/Alt/Ctrl keys are pressed. The isPress parameter is true if the event is a key press event and autoRepeat is true if the event is caused by an auto-repeat mechanism and not an actual key press.

See also processKeyEvent().

void QtopiaInputEvents::suspendMouse ()   [static]

Suspends pointer handling by deactivating all the mouse drivers registered by the QWS_MOUSE_PROTO environment variable.

See also resumeMouse().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3