Sorting out hogging of the Super (or Windows) Key by GNOME Shell

Most of the time, GNOME Shell’s use of the Super (or Windows) key on a standard keyboard to open up its dash area is no issue and is a handy counterpart to what you might do in Windows, especially in its latest incarnations. However, it does cause trouble if you are using a VirtualBox virtual machine with Windows installed in there. While VMware Player is immune to this problem I thought that I would see if there was a workaround for it.

The issue might arise from VirtualBox’s non-grabbing of the Super key like others but a solution can be found in GNOME itself. Opening up dconf-editor and navigating to org > gnome > mutter. In there, you will find a setting called overlay-key and this can be changed. One option is to delete the SUPER_L value and leave it that way. My own preference was to set it to a different key and, to do that, I needed to know what the various key identifiers were. To get these, I ran the following command (just replace any quotes with alternatives in the shell before executing this):

xev | grep -A2 --line-buffered ‘^KeyRelease’ | sed -n ‘/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p’

This opened up an Event Tester window that will need closing when testing is complete. More importantly, the aliases for any keys that were pressed to are issued to the terminal session so you can see what’s what. Initially, the one for the Alt Gr key appealed to me and I set “ISO_Level3_Shift” as the value of the overlay-key property in dconf-editor. When that didn’t work, I set the value to “Menu” and it behaved as expected. While this will mean that context menus will have to be accessed by right-clicking in a Windows session, that is what I do anyway so there isn’t going to be much of a loss in what I have done. A function key might have been another option but I reckon that the context menu key will do me.

Leave a Reply