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

# QWSServer::KeyboardFilter Class Reference
[QtGui module]

The KeyboardFilter class provides a global keyboard event filter. More...

     #include <QWSServer>

- List of all members, including inherited members

### Public Functions

- virtual ~KeyboardFilter ()
- virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) = 0

## Detailed Description

The KeyboardFilter class provides a global keyboard event filter.

Note that this class is only available in Qtopia Core.

KeyboardFilter is used to implement a global, low-level filter on key events in the Qtopia Core server application; this can be used to implement things like APM (advanced power management) suspended from a button without having to filter for it in all applications.

See also QWSServer, QWSInputMethod, and Character Input.

## Member Function Documentation

### KeyboardFilter::~KeyboardFilter () `[virtual]`

Destroys the keyboard filter.

### bool KeyboardFilter::filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) `[pure virtual]`

Returns true if the specified key event should be filtered, stopping the event from being processed any further; otherwise returns false.

Parameter | Description
--- | ---
unicode | The unicode value of the key.
keycode | The Qt keycode value as defined by the Qt::Key enum.
modifiers | An OR combination of Qt::KeyboardModifier values, indicating whether Shift/Alt/Ctrl keys are pressed.
isPress | True if the event is a key press event; otherwise false.
autoRepeat | True if the event is caused by auto repeat (i.e. the user has held the key down and this is the second or subsequent key event being sent); otherwise false.