You can sign up to get a daily email of our articles, see the Mailing List page.
Automatically Temporarily disable "special key to move and resize windows" while gaming?
Guppy Aug 18, 2023
Topic is a bit of a mothfull, let me explain.

On Linux Mint cinamon - and presumably other distros, there is a function in window settings to help you if a window has move completely or partially offscreen called "special key to move and resize windows".

It defaults to ALT if you hold alt and press left mouse you can drag the window even if it's borderless or the window bars are outside of the visible area.

ALT + middle lets you access the window menu.

Both great features - until you encounter programs/games that wants you to use that key + the mouse for something else.

Most recently this is an issue in Baldurs gate 3 - alt key highlights loot, so you hold it often. Middle mouse lets you rotate the camera - but also brings up the window menu and if you are not fast enough to move away the mouse you will hit 'minimize window' and doing that crashes the game. Also it prevents you from clicking the loot label shown while holding ALT because the window manage assumes you are trying to move the window and so eats the mouse event.

TLDR;
I've change the key to super - but I am 100% going to forget this when next I actually need this feature, is there an (easy) way to automatically map the key to "disabled" while running a game ( or blender ) ?
Guppy Aug 30, 2023
I solved it! :D

~$ tail /etc/gamemode.ini 
[custom]
; Custom scripts (executed using the shell) when gamemode starts and ends
start=notify-send "GameMode started"
    gsettings set org.cinnamon.desktop.wm.preferences mouse-button-modifier '<Super>'

end=notify-send "GameMode ended"
    gsettings set org.cinnamon.desktop.wm.preferences mouse-button-modifier '<Alt>'

; Timeout for scripts (seconds). Scripts will be killed if they do not complete within this time.
;script_timeout=10


the above is for cinnamon desktop they org.nnnn.dekstop part is properly different for mate, gnome etc but a little exploring should find the correct one for you :)

This only works if you are using gamemoderun to launch the game, in steam that's:

gamemoderun %command%

as a launch option any extra parameters go after %command%
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.