[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kdecore
From:       CVS by ellis <kde-cvs () kde ! org>
Date:       2001-06-30 14:25:42
[Download RAW message or body]


kdelibs/kdecore kaccel.cpp,1.86,1.87
Author: ellis
Sat Jun 30 14:25:32 UTC 2001


Modified Files:
         kaccel.cpp
Log Message:
Get Print key working in global shortcuts.  I'm skeptical about this patch, but since \
everyone whose tested the Print key so far hasn't had success, this hack at least \
won't break anything that's already working for us.

===================================================================
RCS file: /home/kde/kdelibs/kdecore/kaccel.cpp,v
retrieving revision 1.86
diff -u -3 -d -p -r1.86 kaccel.cpp
--- kaccel.cpp	2001/06/30 13:58:02	1.86
+++ kaccel.cpp	2001/06/30 14:19:19
@@ -899,6 +899,11 @@ uint KAccel::stringToKey( const QString&
 		keySymXMods( keySymX, &keyCombQt, &keyModX );
 	}
 
+	// Hack: for some reason, X defines both keycodes 92 & 111 as being
+	//  Print.  It seems that 111 is usually the correct code.
+	if( keyCodeX == 92 && keySymX == XK_Print && XKeycodeToKeysym( qt_xdisplay(), 111, \
0 ) == XK_Print ) +		keyCodeX = 111;
+
 	if( pKeySymX )	*pKeySymX = keySymX;
 	if( pKeyCodeX )	*pKeyCodeX = keyCodeX;
 	if( pKeyModX )	*pKeyModX = keyModX;
@@ -1083,6 +1088,11 @@ void KAccel::keyQtToKeyX( uint keyCombQt
 			}
 		}
 	}
+
+	// Hack: for some reason, X defines both keycodes 92 & 111 as being
+	//  Print.  It seems that 111 is usually the correct code.
+	if( keyCodeX == 92 && keySymX == XK_Print && XKeycodeToKeysym( qt_xdisplay(), 111, \
0 ) == XK_Print ) +		keyCodeX = 111;
 
 	if( pKeySymX )	*pKeySymX = keySymX;
 	if( pKeyCodeX ) *pKeyCodeX = keyCodeX;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic