Home · All Classes · Grouped Classes · Annotated · Functions

KeyClick Class Reference

The KeyClick class enables an audible clicking sound whenever keys are pressed. More...

    #include <KeyClick>

Inherits QObject.

Public Functions

Protected Functions

Additional Inherited Members


Detailed Description

The KeyClick class enables an audible clicking sound whenever keys are pressed.

The KeyClick class is not a true task. Instead, a real task should derive from the KeyClick baseclass and implement the KeyClick::keyClick() virtual method.

For example, an implementation may look like this:

    class MyKeyClick : public KeyClick
    {
    protected:
        virtual void keyClick(int unicode, int keycode, int modifiers,
                              bool press, bool repeat)
        {
            // Make click noise
        }
    };
    QTOPIA_TASK(MyKeyClick, MyKeyClick);

Key clicking will only occur when the Trolltech/Sound/System/Key configuration variable is true, otherwise KeyClick::keyClick() will not be called. Creating this class automatically enables the "AudibleKeyClick" QtopiaFeature.

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

See also ScreenClick.


Member Function Documentation

KeyClick::KeyClick ()

Construct a new KeyClick instance.

KeyClick::~KeyClick ()   [virtual]

Destroys the KeyClick instance.

void KeyClick::keyClick ( int unicode, int keycode, int modifiers, bool press, bool repeat )   [pure virtual protected]

Called whenever a key event is generated by the system. unicode is set to the unicode value of the key, keycode to the key code of the key, modifiers to the currently depressed modifiers, press will be true if this is a key press and false if it is a key release and repeat will be true if this key event was generated in as a key press repeat.


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3