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

List:       kde-devel
Subject:    Re: global key binding...
From:       Marcos Dione <mdione () grulic ! org ! ar>
Date:       2001-10-23 13:33:17
[Download RAW message or body]

On Tuesday 16 de October de 2001 18:13, Ellis Whitehead wrote:
> 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()));

	I tried that on the kmms applet found in kdenonbeta, and the accelerators 
don't work. here's the code, a bit chopped:

    keys= new KGlobalAccel (this);
    
    keys->insertItem (i18n("Next Track in Playlist"), "Next track", "F21", 0);
    keys->insertItem (i18n("Previous Track in Playlist"), "Prev", "F23", 0);
    keys->insertItem (i18n("Start playing"), "Play", "F20", 0);
    keys->insertItem (i18n("Pause playing"), "Pause", "F22", 0);
    
    keys->connectItem ("prev", this, SLOT(back ()));
    keys->connectItem ("next", this, SLOT(skip ()));
    keys->connectItem ("pause", this, SLOT(pause ()));
    keys->connectItem ("play", this, SLOT(play ()));

	what's wrong? and yes, I have F20-F24 defined on my keyboard; I can use them 
to map them to functions in the control panel... this is kde-2.2.1 from 
debian, by the way.
 
>> 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