The KDE menu and the Windows key.. (HEAD)

Melchior FRANZ a8603365 at unet.univie.ac.at
Mon May 12 08:39:32 BST 2003


* Stephan Kulow -- Monday 12 May 2003 08:55:
> On Saturday 10 May 2003 13:02, Thomas Zander wrote:
> > Since I started running HEAD some weeks ago I ran into the problem that
> > pressing the Windows key pops up the K-Start menu, since the Windows key
> > is the meta key I get this menu every time I move a window or rescale a
> > window.
> > I can't find a way to turn this 'feature' off, please help!
> > 
> For me the menu only appears when I release the key without having pressed
> another key.

As explained in kde-devel, that problem occurs if the "Modifier" in
KControl/Desktop/Window Behavior/Actions/Inner Window is switched to
"Meta" and windows are moved/resized with Meta+[LR]MB. After doing so
and releasing the Meta key, the menu pops up. Of course, ButtonPress
should disable this.

And on my system there's another serious problem: I'm not using one
of the standard keyboards, but one that has two windows-key-equivalent
keys left and right of the space bar. These have keycodes 131 & 129,
rather than 115 & 116 as usual. The problem is now, that these keys
have the repeatability flag enabled by the xkbcompiler. Hence pressing
one of the keys makes the menu constantly flash on and off.

The solution is, of course, to turn the repeatability flags off. But
how is a typical computer user supposed to do that? xmodmap apparently
doesn't! The only way is xkeycaps, but a user can't be expected to do
this after every boot-up. It is therefore necessary to turn repeatability
off in kicker. After all, these flags being turned off is a prerequisite
for using kicker after the kicker/menu feature had been implemented. 

m.



RCS file: /home/kde/kdebase/kicker/buttons/kbutton.cpp,v
retrieving revision 1.12
diff -u -p -r1.12 kbutton.cpp
--- kbutton.cpp 15 Apr 2003 18:20:31 -0000      1.12
+++ kbutton.cpp 12 May 2003 07:18:38 -0000
@@ -56,6 +56,14 @@ KButton::KButton( QWidget* parent )
 #if defined(HAVE_XTEST)
     g_keycodeForSuperL = XKeysymToKeycode( qt_xdisplay(), XK_Super_L );
     g_keycodeForSuperR = XKeysymToKeycode( qt_xdisplay(), XK_Super_R );
+
+    XKeyboardControl kbd;
+    kbd.auto_repeat_mode = AutoRepeatModeOff;
+    kbd.key = g_keycodeForSuperL;
+    XChangeKeyboardControl( qt_xdisplay(), KBKey | KBAutoRepeatMode, &kbd );
+    kbd.key = g_keycodeForSuperR;
+    XChangeKeyboardControl( qt_xdisplay(), KBKey | KBAutoRepeatMode, &kbd );
+
     if( g_keycodeForSuperL || g_keycodeForSuperR ) {
         //kdDebug() << "g_keycodeForSuperL = " << g_keycodeForSuperL
         //    << ", g_keycodeForSuperR = " << g_keycodeForSuperR << endl;




More information about the kde-core-devel mailing list