qt-bugs@ issue : 194970 Trolltech task ID : 195021 bugs.kde.org number : 155033 applied: no author: Lubos Lunak <l.lunak@kde.org> os: unix Fix detecting Meta key when Meta_L or Meta_R is the same modifier like Alt_L/Alt_R and the physical keys actually report Super_L/Super_R. --- src/gui/kernel/qkeymapper_x11.cpp.sav 2008-01-02 11:37:24.000000000 +0100 +++ src/gui/kernel/qkeymapper_x11.cpp 2008-01-16 18:15:16.000000000 +0100 @@ -534,9 +534,8 @@ void QKeyMapperPrivate::clearMappings() keyboardInputDirection = Qt::LeftToRight; } - // set default modifier masks - qt_alt_mask = Mod1Mask; - qt_meta_mask = Mod4Mask; + qt_alt_mask = 0; + qt_meta_mask = 0; qt_super_mask = 0; qt_hyper_mask = 0; qt_mode_switch_mask = 0; @@ -611,6 +610,12 @@ void QKeyMapperPrivate::clearMappings() #endif } + // set default modifier masks if needed + if( qt_alt_mask == 0 ) + qt_alt_mask = Mod1Mask; + if( qt_meta_mask == 0 ) + qt_meta_mask = Mod4Mask; + // if we don't have a meta key (or it's hidden behind alt), use super or hyper to generate // Qt::Key_Meta and Qt::MetaModifier, since most newer XFree86/Xorg installations map the Windows // key to Super