brisk-menu icon indicating copy to clipboard operation
brisk-menu copied to clipboard

[Feature Request] superkey hit to hide the menu

Open aldorgan opened this issue 7 years ago • 11 comments

i'm wondering if it possible to add so when the menu is up and you press the superkey again the menu goes away? instead of pressing escape or a mouse click.

aldorgan avatar Aug 21 '17 11:08 aldorgan

I've only been able to reproduce this issue in a VM. Are you using a VM?

flexiondotorg avatar Aug 23 '17 02:08 flexiondotorg

No VM here, this is on real hardware a laptop with Debian 9 and Mate.

aldorgan avatar Aug 23 '17 07:08 aldorgan

Thanks for confirming. I've found one laptop in my collection where Super won't retract the menu.

flexiondotorg avatar Aug 23 '17 10:08 flexiondotorg

Is this a right super key or left? And is the same super key used for closing/opening?

ikeydoherty avatar Aug 23 '17 11:08 ikeydoherty

@ikeydoherty This is a left superkey and that is the only superkey my laptop has.

@flexiondotorg No problems :)

aldorgan avatar Aug 23 '17 11:08 aldorgan

Greetings! I have the same problem here, an ubuntuMATE-forums member found out that it might be the Num Lock (at least in our cases) what is causing the problem. https://ubuntu-mate.community/t/brisk-menu-does-not-save-config-and-does-not-close-with-super-key/15184 cheers.

Serloff avatar Nov 22 '17 19:11 Serloff

I don't like Ikey very much, so I'll leave that part to you :slight_smile:

Charming.

ikeydoherty avatar Nov 22 '17 19:11 ikeydoherty

@ikeydoherty hahaha sorry, didn't realize it was you he was talking about.

Serloff avatar Nov 22 '17 19:11 Serloff

I'm using Ubuntu MATE 18.04 and I have the same Num Lock issue: if Num Lock is on, the Left Super key only shows (opens) the menu but does not close it; if Num Lock is off, Left Super key opens and closes Brisk Menu always fine without any issue at all.

pemartins1 avatar Jun 07 '18 07:06 pemartins1

@pemartins1 - huh, thanks for that bit of info. I was finally able to reproduce this.

vkareh avatar Jun 07 '18 14:06 vkareh

Bingo! When the menu is open, instead of calling the standard key-binder, we use a simple key-press-event (since we're in a focused window, no need for a global listener) to detect Super_L being pressed and so close the menu.

However, when NumLock is enabled, the accelerator comes back as <Mod2>Super_L, even though the configured shortcut is just Super_L, which means that they are not the same, and so we ignore it. The global key-binder just blacklists the <Mod2> state (and others).

This is a simple fix. I'll work on it today and submit a pull request shortly.

vkareh avatar Jun 07 '18 14:06 vkareh