How to check whether Pen Support is Enabled
This snippet shows how to check whether Pen Support is enabled or not for the current Layout. This can be especially used at runtime to check/support both touch and non-touch codes maintained within the single source code specially for the controls.
Article Metadata
Compatibility
Platform(s): S60 3rd Edition FP1, S60 5th Edition
Platform Security
Signing Required: Self Signed
Capabilities: None
Article
Keywords: AknLayoutUtils::PenEnabled().
Created: vasant21
(22 Oct 2008)
Last edited: hamishwillee
(08 May 2013)
MMP file
The following capabilities and libraries are required:
CAPABILITY None
LIBRARY avkon.lib
LIBRARY eikcore.lib
Source:
#include <AknUtils.h>
TBool isPenEnabled = AknLayoutUtils::PenEnabled();
Postconditions
isPenEnabled is ETrue if Pen Support is enabled for the current Layout, EFalse otherwise.


29 Sep
2009
When any application is made for touch phones, every display or layout may have touch capability. Means when any persons touch to any button but that layout doesn’t have pen support then button will not be clicked. So this article solves this. It uses a method PenEnabled() of AknLayoutUtils Class. This method returns true if the layout is pen supported other wise returns false.
So this is basic and useful information for the developer who wants to develop for S60 5th Edition touch phones.