On Tuesday 03 January 2006 15:27, Lubos Lunak wrote:
> On Monday 02 January 2006 12:14, Stefan Kombrink wrote:
> > On Monday 02 January 2006 10:41, David Faure wrote:
> > > On Monday 02 January 2006 10:39, Stefan Kombrink wrote:
> > > > Hi everybody,
> > > >
> > > > I'd like my application to catch global key press events. I could
> > > > do it using pure X11 but I don't think that's the very clean way.
> > > > Maybe there's a possibiliy to do it in KDE?
> > > > Just point me to the proper class, then!
> > >
> > > KGlobalAccel, then

> >
> > Thanks for answering so quickly.
> > However, I want to trace any keypress events, not a certain global
> > accelerator sequence.

>
> You can't do that with KDE libs, since a vast majority of applications
> have no reasonable use for getting every single keypress. You'll have to go
> with pure X, one of the recent X extensions should be able to do that I
> think, or you could use some ugly hack like
> kdebase/kdesktop/xautolock_diy.c, or something like that. I don't know
> precisely how one would do that.
>
> Well, unless the thing you're looking for is QWidget::grabKeyboard(),
> which redirects all keyboard input to the given widget.


Thanks for the hints!
Anybody trying similar things might have a look at
kdereview/ksynaptics/src/syndaemon.cpp

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