[vtkusers] vtkRenderWindowInteractor - how to disable autorepeat for keyboard
Laurent Mundeleer
laurent.mundeleer at uclouvain.be
Wed Sep 7 05:26:57 EDT 2011
Hi Clinton,
Thank you for the idea.
Unfortunately this GetRepeatCount() returns strange values : always 1 if
it's the only key pressed, and if I move the mouse to handle an
interaction for instance it jumps directly to 5 or 6...
So I can't rely on it.
Regards,
Laurent
On Tue, 2011-09-06 at 12:00 -0400, vtkusers-request at vtk.org wrote:
> > > -------- Forwarded Message --------
> > > From: Clinton Stimpson <clinton at elemtech.com>
> > > To: vtkusers at vtk.org
> > > Subject: Re: [vtkusers] vtkRenderWindowInteractor - how to disable
> > > autorepeat for keyboard
> > > Date: Tue, 6 Sep 2011 08:16:35 -0600
> > >
> > > On Tuesday, September 06, 2011 02:12:21 am Laurent Mundeleer wrote:
> > > > Hi everyone,
> > > > I'm facing a problem with the vtkRenderWindowInteractor, which I have
> > > > connected to slots with vtkEventQtSlotConnect. It's working, but :
> > > > the problem is that when a keyboard key is pressed, I receive continous
> > > > event "pressed"-"released"-"pressed"-"released" even if the key is not
> > > > released but kept pressed. I'm not encoutering the same problem with
> > > > mouse buttons for instance.
> > > > Is there a way to disable this "autorepeat" mechanism for keyboard keys
> > > > in vtk ?
> > > > I understand it can be useful when we keep an arrow pressed for example
> > > > to have continuous events propagated, but it doesn't suit my needs.
> > > >
> > >
> > > You can detect if its a repeat by calling
> > > vtkRenderWindowInteractor::GetRepeatCount().
> > >
> > > Or perhaps there is a platform specific method for disabling it.
More information about the vtkusers
mailing list