From kde-commits Sat May 17 21:55:56 2003 From: Ellis Whitehead Date: Sat, 17 May 2003 21:55:56 +0000 To: kde-commits Subject: KDE_3_1_BRANCH: kdelibs/kdecore X-MARC-Message: https://marc.info/?l=kde-commits&m=105320856317080 CVS commit by ellis: Fix for non-working global keypad shortcuts -- see comment from 2003-04-30 in Bug #56871 M +16 -5 kglobalaccel_x11.cpp 1.20.2.1 --- kdelibs/kdecore/kglobalaccel_x11.cpp #1.20:1.20.2.1 @@ -219,9 +219,20 @@ bool KGlobalAccelPrivate::x11KeyPress( c // TODO: what's the xor operator in c++? uint sym = XKeycodeToKeysym( qt_xdisplay(), codemod.code, 0 ); + // If this is a keypad key, if( sym >= XK_KP_Space && sym <= XK_KP_9 ) { + switch( sym ) { + // Leave the following keys unaltered + // FIXME: The proper solution is to see which keysyms don't change when shifted. + case XK_KP_Multiply: + case XK_KP_Add: + case XK_KP_Subtract: + case XK_KP_Divide: + break; + default: if( codemod.mod & KKeyServer::modXShift() ) codemod.mod &= ~KKeyServer::modXShift(); else codemod.mod |= KKeyServer::modXShift(); + } } }