autorepeat and the alt key
Hello,
I've installed an event filter in my app, and I'm trying to catch key events.
my code looks like this:
Code:
{
if( dynamic_cast<QKeyEvent*>(pEvent) )
{
OutputDebugString( L"key\n" );
}
}
When I hold down a key, I get several events. They stop when I release the key. That is what I want, so that's good.
However when I hold down the alt key, I don't get multiple events when holding down the key. I only get one or two QKeyEvents.
Does anyone know why?
Re: autorepeat and the alt key
alt key is considered as key modifier in Qt, so I guess this is reason for only two events, you can check for alt key down(Qt::AltModifier) flag in QKeyEvent::modifiers () ;