Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 05:41, 28 November 2012 by hamishwillee (Talk | contribs)

Giving tactile feedback in touch UI apps using Symbian C++

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia 5800 XpressMusic
Platform(s): S60 5th Edition
S60 5th Edition
Keywords: MTouchFeedback
Created: tepaa (14 Oct 2008)
Last edited: hamishwillee (28 Nov 2012)



Tactile feedback provides the user a physical pulse (vibration) when touch screen interaction has been successful.

Tactile feedback provides an interface to add, modify, and remove feedback areas in the registry. There is also an option to trigger direct feedback by bypassing the registry.

MTouchFeedback is used for acquiring a pointer to the touch feedback instance.

This snippet can be self-signed.

MMP file

The following capabilities and libraries are required:

CAPABILITY None       
LIBRARY touchfeedback.lib

Header file

Include two headers

#include <touchfeedback.h>
#include <touchlogicalfeedback.h>
class CImageConverterContainer : public CCoeControl
MTouchFeedback* iTouchFeedBack;

Source file

// Create an instance of touch feedback
void CImageConverterContainer::ConstructL(const TRect& /*aRect*/)
iTouchFeedBack = MTouchFeedback::Instance();
// Give some vibra to the user when a pointer down event occurs
void CImageConverterContainer::HandlePointerEventL(const TPointerEvent& aPointerEvent)
if (aPointerEvent.iType == TPointerEvent::EButton1Down)
// Give feedback to user (vibration)

Parameters into MTouchFeedback::InstantFeedback().

 *  ETouchFeedbackNone      - Use for disabling feedback for some areas of the
* window when using area registry.
* ETouchFeedbackBasic - Use as default feedback for pen down events.
* For example, pressing a button or tab.
* ETouchFeedbackSensitive - Sensitive feedback situations
* where the triggering action is not very
* important (e.g. change focus in list), or when
* there can be a large amount of feedback in
* a short time (e.g. text selection which gives
* feedback on every new selected character).
* Also used for scrolling and dragging.


The user gets vibration feedback when using the stylus / finger down (tapping on the screen).

See also

S60 Platform: Image Converter Example

63 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.