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

KeyClick Class Reference
[QtMediaModule]

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. If a settings application updates this variable it should send the message "updateAudibleKeyClick()" on the "QPE/System" channel to allow the value to be reread. Creating this class automatically enables the "AudibleKeyClick" QtopiaFeature.

This class is part of the Qt Extended server and cannot be used by other Qt Extended 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 © 2009 Nokia Trademarks
Qt Extended 4.4.3