--===============0551959242==
Content-Type: multipart/signed;
boundary="nextPart2117467.2QEBH6TO1d";
protocol="application/pgp-signature";
micalg=pgp-sha1
Content-Transfer-Encoding: 7bit

--nextPart2117467.2QEBH6TO1d
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Wednesday 05 April 2006 14:54, p-eco@rocketmail.com wrote:
> Hi,
>
> I'm trying to intercept keystrokes before they reach a kate-part. I
> installed an eventfilter:
> view->installEventFilter(this);
>
> And then I try to eat key presses:
>
> bool MyClass::eventFilter( QObject *o, QEvent *e )
> {
> qDebug( "Event type : %d", e->type() );
> if ( e->type() =3D=3D QEvent::KeyRelease ) {
> QKeyEvent *k =3D (QKeyEvent *)e;
> qDebug( "Ate key press %d", k->key() );
> return true; // eat event
> } else {
> // standard event processing
> return FALSE;
> }
> }
>
> Everything works, except key presses are not intercepted. I can still type
> in my kate-part and see letters appearing.
>
> What am I doing wrong?


You filter key releases and not key presses. Try QEvent::KeyPress. Or both,=
I=20
don't know how the Kate part works.

Bye,
Stefan

--nextPart2117467.2QEBH6TO1d
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBEM8AEpfDn2DABIpcRAk/CAJ9wD1zFIQzgVtGqkSmfQwbuBJbvjQCfTJS6
4n/06GGDV0i241zxf7b2mHU=
=bmBh
-----END PGP SIGNATURE-----

--nextPart2117467.2QEBH6TO1d--

--===============0551959242==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


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


--===============0551959242==--