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

List:       kde-devel
Subject:    global key press and key release events
From:       Alexander Neundorf <neundorf () dellingsoft ! de>
Date:       2002-07-16 6:44:10
[Download RAW message or body]

Hi,

I'd like to get X11-global keypress and keyrelease events.
I tried the following in KGlobalAccel:

bool KGlobalAccelPrivate::x11Event( XEvent* pEvent )
{
   kdDebug()<<"KGlobalAccel::x11Event()"<<endl;
   switch( pEvent->type ) {
...
      case XKeyRelease:
      x11KeyRelease( pEvent );
   default:
      return QWidget::x11Event( pEvent );
   }
}

void KGlobalAccelPrivate::x11KeyRelease(const XEvent *pEvent )
{
   if( !m_bEnabled )
      return;
   if (m_keyPressSignals)
      emit keyReleased(pEvent->xkey.keycode);
}

and the same for the key press events.
 
However, I get the signals for the key press events, but only very seldom for 
the key release events. The keys are on a USB IR remote control. xev shows 
key press and key release events for every key on the RC. For many keys not 
even the "KGlobalAccel::x11Event()" output is printed on key release events.

Any ideas how to get this working ?

Bye
Alex
 
>> 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