diff -r 0920c6a9b6c8 -r 8b8b34fa9751 hsappkeyhandler/src/hsappkeyplugin.cpp --- a/hsappkeyhandler/src/hsappkeyplugin.cpp Tue Jun 29 10:20:30 2010 +0300 +++ b/hsappkeyhandler/src/hsappkeyplugin.cpp Fri Jul 09 14:19:08 2010 +0300 @@ -20,8 +20,10 @@ #include #include #include +#include #include #include +#include #include "hsappkeyplugin.h" const TUid KHSAppUid = { 0x20022F35 }; @@ -46,12 +48,6 @@ CHsAppKeyPlugin* CHsAppKeyPlugin::NewL() { CHsAppKeyPlugin* self = new (ELeave) CHsAppKeyPlugin; - self->iEikEnv->RootWin().CaptureLongKey(EKeyApplication0, - EKeyApplication0, - 0, - 0, - 0, - ELongCaptureWaitShort); return self; } @@ -119,7 +115,16 @@ key.iCode = EKeyApplication0; key.iScanCode = EStdKeyApplication0; key.iModifiers = 0; + key.iRepeats = 0; aKeyEventArray.Append(key); + + TKeyEvent longkey; + longkey.iCode = EKeyApplication0; + longkey.iScanCode = EStdKeyApplication0; + longkey.iModifiers = 0; + longkey.iRepeats = 1; + aKeyEventArray.Append(longkey); + } // --------------------------------------------------------------------------- @@ -160,15 +165,20 @@ void CHsAppKeyPlugin::HandleLongPressL() { if( !mDialog ) { - mDialog = CHbDeviceDialogSymbian ::NewL(); - - CHbSymbianVariantMap* params = CHbSymbianVariantMap::NewL(); - + TInt value( 0 ); + RProperty::Get( TsProperty::KCategory, + TsProperty::KVisibilityKey, + value ); + if(!value){ + mDialog = CHbDeviceDialogSymbian::NewL(); + + CHbSymbianVariantMap* params = CHbSymbianVariantMap::NewL(); if(KErrNone != mDialog->Show(KTsPluginName,*params,this)) { delete mDialog; mDialog = 0; + } + delete params; } - delete params; } } // End of File