Not passing Mod key to applications

Hi everyone, In what appears to be typical fashion, I have that pesky Windows key (mod4mask) mapped to Mod. That's been nice because it's mostly unused anywhere else. But the devil is in the word "mostly". I have to run some Windows VMs and terminals. They do actually use that key. So when I start to press, say, Mod-5 to switch to a different workspace, the Windows session does something as soon as I press mod. This is even worse with VirtualBox, which somehow prevents xmonad from seeing the keypress when VirtualBox is active. I'd rather have xmonad completely eat all Mod keypresses, and let no other application, even those Windows RDP or VirtualBox sessions, ever see it. I don't really ever use it in Windows anyhow, so it's just causing annoyance. For awhile, Google Docs popped up keyboard shortcut help when I'd press it over one if its windows. I think that behavior has now gone away, but I'm not certain if it's something they did or something I did. Is there a quick trick to accomplish this? Thanks, -- John

Quoting John Goerzen
I'd rather have xmonad completely eat all Mod keypresses, and let no other application, even those Windows RDP or VirtualBox sessions, ever see it. I don't really ever use it in Windows anyhow, so it's just causing annoyance.
Is there a quick trick to accomplish this?
Thanks for asking, because it prompted me to finally solve this long-standing annoyance in my own installation. =) I now have the following line in my keybindings: ((0, xK_Super_L), return ()) -- make VirtualBox ignore stray hits of the Windows key when xmonad has the active grab ~d

John Goerzen wrote:
I'd rather have xmonad completely eat all Mod keypresses, and let no other application, even those Windows RDP or VirtualBox sessions, ever see it... Is there a quick trick to accomplish this?
wagnerdm wrote:
((0, xK_Super_L), return ()) -- make VirtualBox ignore stray hits of the Windows key when xmonad has the active grab
Great! I really need this, because I am about to start using Windows in VirtualBox on a regular bases, and I've already felt this annoyance occasionally in VNC. Thanks! This is probably something that is needed by a large proportion of xmonad users. Where can it be posted so that people will likely hear about it? I don't remember anymore how I found out how to make the Windows key my Mod key. But this important additional setting should be added there. Thanks, Yitz
participants (3)
-
John Goerzen
-
wagnerdm@seas.upenn.edu
-
Yitzchak Gale