The Motorola Development Community


Go Back   MotorolaFans.com Forums > Developments > Development
Notices

Development Hacking, development, scripts etc

Reply

MotoFans JUNR

Join Date: Feb 2006
Posts: 82
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via ICQ to oopsware Send a message via MSN to oopsware
Quote  
#1
04-17-2008
Default get keypad event after keypad locked

found a new api in ezxappbase-xscale-r.so
QCString GetHardKeyChannelName();
it return a const string "/hardkey/bc"

now, we can get keypad event when keypad is locked .

when ZMainWidget create:
{
....
QCString HardKeyChannelName = GetHardKeyChannelName();
qWarning("HardKeyChannel: %s\n", (const char *)HardKeyChannelName);

QCopChannel * cch;
// get vol+ vol- key press event
cch = new QCopChannel(QCString("/EZX/Volume"), this);
connect(cch, SIGNAL(received(const QCString &, const QByteArray &)), SLOT ( myhkc(const QCString &, const QByteArray &)) );
// get HOME LOCK key press event
cch = new QCopChannel(HardKeyChannelName, this);
connect(cch, SIGNAL(received(const QCString &, const QByteArray &)), SLOT ( myhkc(const QCString &, const QByteArray &)) );
....
}

// and the public slots of your MainWidget receive events

void MainWidget::myhkc( const QCString & msg, const QByteArray & /*data*/ )
{
qWarning("HardKey event: %s\n", (const char *)msg);
}


now , we can got RKeyPress、LKeyPress、HOME、FLIP events when keypad is locked like FM Radio and Realplayer.

Last edited by oopsware; 04-17-2008 at 10:12 AM.
Reply With Quote


User Information
Current Phone: E680i
oopsware is offlineReport Post
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:15 PM. Search Engine Friendly URLs by vBSEO 3.2.0 Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. VBulletin Skin by ForumMonkeys.