Dougiedee13 / gnome2-globalmenu

Automatically exported from code.google.com/p/gnome2-globalmenu
GNU General Public License v2.0
0 stars 0 forks source link

mnemonic keys not working #588

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Title says it all,
I try to press Alt+Key and I got nothing :/

Version: gnome-applet-globalmenu    0.7.9-0ubuntu1~ppa1~karmic1

------------------------

What steps will reproduce the problem?
1.Open GlobalMenu
2.Try to use a mnemonic

What is the expected output?
Mnemonic activated

What do you see instead?
Nothing

What version of the Global Menu are you using? On what operating system?
gnome-applet-globalmenu 0.7.9-0ubuntu1~ppa1~karmic1
Ubuntu karmic

Original issue reported on code.google.com by marcosro...@gmail.com on 16 Mar 2010 at 4:12

GoogleCodeExporter commented 8 years ago
Ok found the problem, it was NUMLOCK ON.

But why does it happen?

Original comment by marcosro...@gmail.com on 16 Mar 2010 at 4:16

GoogleCodeExporter commented 8 years ago
Hi!
I found this with Google's help, have here exact the same problem and noticed 
(thanks
to marcosrorizinf!) that this bug appears only with activated numlock.
For more information/logs needed for fixing this bug, just let me do and I'll 
do what
I can :)

Ubuntu karmic 2.6.31-20-generic-pae
gnome-applet-globalmenu 0.7.9-0ubuntu1~ppa1~karmic1

Original comment by markus.b...@googlemail.com on 20 Apr 2010 at 4:42

GoogleCodeExporter commented 8 years ago
I'm guessing this has something to do with X's Modifier system (Since 
Gnome-globalmenu calls X directly in order to grab its keys), where Alt 
activates Mod1 while pressed... and Numlock constantly activates Mod2 when on.

That said, it's easy enough to hack the code to grab Mod1+Mod2+<key> in 
addition to Mod1+<key> but this seems a little inelegant.

Original comment by erikas.aubade@gmail.com on 26 Jun 2010 at 12:22

GoogleCodeExporter commented 8 years ago
It's inelegant to have it broken.

It's also pointless to worry about proper implementation when a fault is 
blatantly exposed.

Original comment by skaiuoq...@gmail.com on 26 Jun 2010 at 6:18

GoogleCodeExporter commented 8 years ago
Alright, here's the patch. On my system, at least, Mod2 is numlock and Mod3 is 
scroll lock. (Mod5 is AltGr, so it's not persistent). Caps Lock might also need 
to be accounted for, but i don't have a capslock key set up, so i haven't 
tested that.

It works for me, and will probably work for anyone willing to compile the 
menubar, but i really don't think it's suitable for inclusion. Instead, i'd 
recommend using a more flexible system of detecting the Modifier keys--perhaps 
lifting some of the code from GDK? I'm assuming the code calls X directly 
because GDK doesn't allow globally grabbing a key this way, but i'll propose 
looking into GDK's code a little and seeing if the modifier recognition code 
couldn't be adapted. (I'll look into this myself too, but i'm not a programmer) 

Anyhow, here's the patch.

Original comment by erikas.aubade@gmail.com on 26 Jun 2010 at 6:33

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you for the patch. I'll apply the patch by this weekend. 

Original comment by rainwood...@gmail.com on 30 Jun 2010 at 3:58

GoogleCodeExporter commented 8 years ago
Thank you for the patch. The patch has been applied in commit 8085ead..781407f.

Original comment by rainwood...@gmail.com on 4 Jul 2010 at 5:13

GoogleCodeExporter commented 8 years ago
I strongly urge a better solution than mine be at least looked into.

Original comment by erikas.aubade@gmail.com on 5 Jul 2010 at 3:22

GoogleCodeExporter commented 8 years ago
GDK doesn't grab keys globally. gnome-settings-daemon is probably the place to 
look - I remember it does some nasty X grabs; will you be digging into the code?

Original comment by rainwood...@gmail.com on 5 Jul 2010 at 4:36