Stuck with a grabby mouse

For some time now, I’ve occasionally experienced a rather frustrating issue. It doesn’t happen often, but when I restart Gnome Shell 3, my Alt modifier is put in a semi-stuck state. Gnome acts as though it is being held, because this key is used to grab and move windows. This means that, when in this state, it isn’t possible to click on any window elements, but only move them. I say it’s “semi-stuck” because pressing the alt key still does certain actions, like bring up or highlight the File/Edit bar and menu options.

I have tried many things to correct his issue, but the main problem I have had with fixing it, is that it doesn’t happen very often. Perhaps once every few months. And when it does happen, I don’t always have the time to spend trying to fix it. My main approach was to try simulating a release keypress for the Alt key. I tried using both xmacros and xdotool but neither of these corrected the issue. I don’t doubt that the press was properly simulated, but the issue seemed to be caused by something else.

The issue appeared once again recently, and while I haven’t found a fix, I discovered a workaround that became very useful. The biggest inconvenience that comes from this problem, is that it makes it nearly impossible to save and/or finish any work being done, before restarting X or rebooting. I figured this time, instead of trying to simulate the keypress, I would disable the window grabbing function. Switching to a different TTY using ctrl + alt + <number> (because yes, alt is part of this combo), I ran this command:

gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super><Alt>"

This command changes the shortcut for window grabbing to Super + Alt, instead of just Alt (any random combo should work). Switching back to the original TTY, I found I could click on almost everything normally. The only thing that didn’t seem to work was clicking on web links (middle clicking worked though). With this, I was able to finish my work, logout and back in, reset the modifier to just <Alt>, and everything was back to normal.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s