[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: global key binding...
From:       Ellis Whitehead <kde () ellisw ! net>
Date:       2001-10-16 21:13:40
[Download RAW message or body]

KGlobalAccel is the class you're looking for.  Do something like the 
following.

pGlobalAccel = new KGlobalAccel( pWindow );
pGlobalAccel->insertItem( i18n("Description"), "Name", "Alt+Ctrl+P" );
pGlobalAccel->connectItem( "Name", pWindow, SLOT(pWindow->slotSomething()) );

However, that will change in CVS on Friday (presuming I get my KGlobalAccel 
changes committed then).  After that something more like:

pGlobalAccel = new KGlobalAccel( pWindow );
pGlobalAccel->insertItem( "Name", i18n("Description"),
	KShortcuts("Alt+Ctrl+P"), KShortcuts("Meta+Ctrl+P"),
	pWindow, SLOT(pWindow->slotSomething()) );
pGlobalAccel->updateConnections();

On Tuesday 16 October 2001 03:43 pm, Eduardo Dominguez wrote:
> is  it possible to create a global key binding so that,
> for example, if i am in kmail (or any other app) and I
> do a keyboard combo (like ctrl-alt-p) my app receives
> this notification and acts accordingly..
>
> thanks in advance..

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic