Pressing and releasing the Win-key opens the K-Menu

Ellis Whitehead ellis at kde.org
Wed Apr 2 23:44:49 BST 2003


On Tuesday 01 April 2003 15:36, Lubos Lunak wrote:
> On Monday 31 of March 2003 10:24, Ellis Whitehead wrote:
> > Hi all,
> >
> > I just committed a patch to kdebase/kicker/buttons/kbutton.*, which opens
> > the K-Menu when the Win-key is pressed and released with no intervening
> > keys.  It will only work if the Win-keys are assigned Super_L and/or
> > Super_R, as is standard in XFree 4.x -- the old Meta assignments won't
> > trigger it.  If anyone has problems or suggestions, please let me know.
>
>  Start KMenuEdit, assign Meta+H to 'Home' entry, apply.
> #1: Press Meta+H -> nothing happens.
> #2: Even if it worked, I bet I'd get both Konqueror showing my $HOME dir
> and Kicker showing the K-Menu.
> #3: Press Meta and repeatedly hit H - Konqy will be started (random number
> of times < number of times H was pressed ? )
> #4: It doesn't work with NumLock pressed.
>
>  Some of them could be fixed, but let's go directly to the worst one: #1
> doesn't work simply since the grab for Meta+H is ignored, because Kicker
> has the keyboard grabbed as soon as Meta is pressed. XSendEvent() won't
> trigger the Meta+H grab.

I tried your example and get the same results as you (except that the number 
of times to hit 'H' in #3 is always 2), but do you have any idea why this 
doesn't work?  All of the Win+<key> shortcuts I have assigned to kwin, 
kdesktop, etc., work fine...

> - using XTestFakeKeyPress() instead of XSendEvent(), which could work,
> since it will trigger the Meta+H grab.

I'll take this approach.  My hesitation is that I don't know if everybody 
who's compiling KDE has the XTest extension.  Do you know?  Is it a standard 
part of X for Solaris, for example?

Cheers,
Ellis





More information about the kde-core-devel mailing list