[raiguard] [2.0.10] Alt + Click not registering on Linux

Things that we don't consider worth fixing at this moment.
Post Reply
pipai
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Oct 25, 2024 6:18 am
Contact:

[raiguard] [2.0.10] Alt + Click not registering on Linux

Post by pipai »

Running Factorio on Arch Linux.

The controls for Alt + Left/Right/Middle Click don't register. Pinning an item (default Alt + Right Click), opening Factoriopedia (Alt + Left Click), and also attempting a rebind to Alt + Left/Right/Middle Click doesn't work. Their functions do work with other combinations, such as Ctrl + Alt + Left/Right Click. Alt + other combinations are fine, it appears to specifically be Alt + Mouse controls that don't work.
Attachments
factorio-current.log
(15.61 KiB) Downloaded 10 times

User avatar
teemu
Inserter
Inserter
Posts: 46
Joined: Tue Sep 20, 2016 10:08 pm
Contact:

Re: [2.0.10] Alt + Click not registering on Linux

Post by teemu »

I use MATE where Alt+mouse move drags the window instead. Perhaps that's absorbing the click event?

Ameb
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Mar 06, 2019 6:39 pm
Contact:

Re: [2.0.10] Alt + Click not registering on Linux

Post by Ameb »

Have you checked in Controls settings if you can bind combinations with Alt?

pipai
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Oct 25, 2024 6:18 am
Contact:

Re: [2.0.10] Alt + Click not registering on Linux

Post by pipai »

Alt + any keyboard combo is fine, so my window manager definitely isn't the problem.

I can definitely bind other combos with Alt, I checked with Ctrl + Alt + Left Click.

esainane
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Oct 23, 2024 7:22 pm
Contact:

Re: [2.0.10] Alt + Click not registering on Linux

Post by esainane »

Is your xfce4 configured to use Alt-click to drag windows around? I remember this being the default at some point, and it wouldn't interfere with Alt-keyboard or combined modifier click combos. Alt-click is working for me on my Linux installation, but I had to change Alt-click since it interfered with shortcuts in a lot of regular programs.

To check the current configuration, try:

Code: Select all

xfconf-query -c xfwm4 -p /general/easy_click
To change the configuration to the use the Super key instead:

Code: Select all

xfconf-query -c xfwm4 -p /general/easy_click -n -t string -s "Super"

User avatar
mward
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Wed Dec 24, 2014 9:38 am
Contact:

Re: [2.0.10] Alt + Click not registering on Linux

Post by mward »

I am having the same issue with Mageia 8.3, KDE Plasma 5.20

pipai
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Oct 25, 2024 6:18 am
Contact:

Re: [2.0.10] Alt + Click not registering on Linux

Post by pipai »

Oh wow, I didn't even know that key combo existed. Thanks, @esainane, I switched it to use Super.

If you're running xfce like I am, check that first!

gridstop
Inserter
Inserter
Posts: 47
Joined: Sun Jul 17, 2016 1:46 am
Contact:

Re: [raiguard] [2.0.10] Alt + Click not registering on Linux

Post by gridstop »

esainane wrote:
Fri Oct 25, 2024 1:38 pm
Is your xfce4 configured to use Alt-click to drag windows around? I remember this being the default at some point, and it wouldn't interfere with Alt-keyboard or combined modifier click combos. Alt-click is working for me on my Linux installation, but I had to change Alt-click since it interfered with shortcuts in a lot of regular programs.

To check the current configuration, try:

Code: Select all

xfconf-query -c xfwm4 -p /general/easy_click
To change the configuration to the use the Super key instead:

Code: Select all

xfconf-query -c xfwm4 -p /general/easy_click -n -t string -s "Super"
Huge thanks esainane!

If you don't want to install xconf-query and use that from the command line, you can find the same option in the Graphical Settings manager for xfce, under Settings Editor -> xfwm4 -> easy_click, change the value from "Alt" to "Super" as above.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 569
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard] [2.0.10] Alt + Click not registering on Linux

Post by raiguard »

Please launch the game from the terminal with SDL_EVENT_LOGGING=1 and see if the game receives SDL events for the click. If so, please post them so I can see.

This is what it looks like for me:

Code: Select all

INFO: SDL EVENT: SDL_KEYDOWN (timestamp=639166 windowid=1 state=pressed repeat=false scancode=226 keycode=1073742050 mod=256)
INFO: SDL EVENT: SDL_MOUSEBUTTONDOWN (timestamp=639239 windowid=1 which=0 button=1 state=pressed clicks=1 x=1552 y=705)
INFO: SDL EVENT: SDL_MOUSEBUTTONUP (timestamp=639315 windowid=1 which=0 button=1 state=released clicks=1 x=1552 y=705)
INFO: SDL EVENT: SDL_KEYUP (timestamp=639481 windowid=1 state=released repeat=false scancode=226 keycode=1073742050 mod=0)
Don't forget, you're here forever.

smegma_yogurt
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Oct 29, 2024 2:59 am
Contact:

Re: [raiguard] [2.0.10] Alt + Click not registering on Linux

Post by smegma_yogurt »

Hi, had a similar issue while running the game in Linux mint. Installation through Steam.

I found this thread where someone had a similar issue.

Raiguard suggested to run with SDL logging but since I installed from Steam, all I managed to log was this:

Code: Select all

0.000 Initializing Steam API.
steam.sh[11275]: Running Steam on linuxmint 22 64-bit
steam.sh[11275]: STEAM_RUNTIME is enabled automatically
setup.sh[11467]: Steam runtime environment up-to-date!
0.000 Steam requires game restart, restarting...


Either way, I managed to fix the issue by turning off the Virtual Keyboard. In Linux Mint (Cinnamon) it is found on System Settings > Acessibility > Keyboard and turning off the Virtual Keyboard.

That did the trick for me and now Alt + Click is working properly.

Hope this helps someone.


Edit: Ignore that above. I'm an idiot and didn't realize I used shift+click instead of alt+click.

pipai
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Oct 25, 2024 6:18 am
Contact:

Re: [raiguard] [2.0.10] Alt + Click not registering on Linux

Post by pipai »

Steam version has the same logs as smegma_yogurt, so I downloaded the actual Linux binary. Switched xfce's setting back to Alt with:

Code: Select all

xfconf-query -c xfwm4 -p /general/easy_click -n -t string -s "Alt"
These are the logs for the relevant section:

Code: Select all

// Pressed Alt.
INFO: SDL EVENT: SDL_KEYDOWN (timestamp=33732 windowid=1 state=pressed repeat=false scancode=226 keycode=1073742050 mod=4352)
INFO: SDL EVENT: SDL_KEYUP (timestamp=34115 windowid=1 state=released repeat=false scancode=226 keycode=1073742050 mod=4096)
// Clicked Mouse left.
INFO: SDL EVENT: SDL_MOUSEBUTTONDOWN (timestamp=35901 windowid=1 which=0 button=1 state=pressed clicks=1 x=1269 y=661)
INFO: SDL EVENT: SDL_MOUSEBUTTONUP (timestamp=36250 windowid=1 which=0 button=1 state=released clicks=1 x=1269 y=661)
// Pressed Alt.
INFO: SDL EVENT: SDL_KEYDOWN (timestamp=37451 windowid=1 state=pressed repeat=false scancode=226 keycode=1073742050 mod=4352)
// Clicked Mouse left, no response.
// Released Alt.
INFO: SDL EVENT: SDL_KEYUP (timestamp=39169 windowid=1 state=released repeat=false scancode=226 keycode=1073742050 mod=4096)
It appears that it detects the Alt button, and it detects the Mouse down buttons, but for some reason it doesn't detect it when I use both. So xfce is definitely getting in the way somehow.

ct402
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Jan 17, 2021 12:19 pm
Contact:

Re: [raiguard] [2.0.10] Alt + Click not registering on Linux

Post by ct402 »

Hi, using Linux Mint 21.3 Cinnamon here, I have the same issue with Left alt+click not working (it works when i use the right alt though) :

Code: Select all

// Using Left Alt :
// Pressed and released Left Alt
INFO: SDL EVENT: SDL_KEYDOWN (timestamp=172032 windowid=1 state=pressed repeat=false scancode=226 keycode=1073742050 mod=4352)
INFO: SDL EVENT: SDL_KEYUP (timestamp=172148 windowid=1 state=released repeat=false scancode=226 keycode=1073742050 mod=4096)

// Pressed and released Left click
INFO: SDL EVENT: SDL_MOUSEBUTTONDOWN (timestamp=173648 windowid=1 which=0 button=1 state=pressed clicks=1 x=1885 y=1489)
INFO: SDL EVENT: SDL_MOUSEBUTTONUP (timestamp=173783 windowid=1 which=0 button=1 state=released clicks=1 x=1885 y=1489)

// Trying to do Left Alt + Click (here it seems the window manager intercepted the event as mentionned before)
INFO: SDL EVENT: SDL_KEYDOWN (timestamp=174683 windowid=1 state=pressed repeat=false scancode=226 keycode=1073742050 mod=4352)
INFO: SDL EVENT: SDL_WINDOWEVENT (timestamp=174852 windowid=1 event=SDL_WINDOWEVENT_TAKE_FOCUS data1=0 data2=0)
INFO: SDL EVENT: SDL_KEYUP (timestamp=175200 windowid=1 state=released repeat=false scancode=226 keycode=1073742050 mod=4096)

// Using Right Alt and doing the same :
// Pressed and released Right Alt
INFO: SDL EVENT: SDL_KEYDOWN (timestamp=309793 windowid=1 state=pressed repeat=false scancode=230 keycode=1073742054 mod=4608)
INFO: SDL EVENT: SDL_KEYUP (timestamp=309909 windowid=1 state=released repeat=false scancode=230 keycode=1073742054 mod=4096)

// Pressed and released Left click
INFO: SDL EVENT: SDL_MOUSEBUTTONDOWN (timestamp=310776 windowid=1 which=0 button=1 state=pressed clicks=1 x=1695 y=1519)
INFO: SDL EVENT: SDL_MOUSEBUTTONUP (timestamp=310926 windowid=1 which=0 button=1 state=released clicks=1 x=1695 y=1519)

// Doing Right Alt + Click (Here it works and Factoriopedia opens)
INFO: SDL EVENT: SDL_KEYDOWN (timestamp=311642 windowid=1 state=pressed repeat=false scancode=230 keycode=1073742054 mod=4608)
INFO: SDL EVENT: SDL_MOUSEBUTTONDOWN (timestamp=311893 windowid=1 which=0 button=1 state=pressed clicks=1 x=1695 y=1519)
INFO: SDL EVENT: SDL_MOUSEBUTTONUP (timestamp=311994 windowid=1 which=0 button=1 state=released clicks=1 x=1695 y=1519)
INFO: SDL EVENT: SDL_KEYUP (timestamp=312225 windowid=1 state=released repeat=false scancode=230 keycode=1073742054 mod=4096)
INFO: SDL EVENT: SDL_WINDOWEVENT (timestamp=313558 windowid=1 event=SDL_WINDOWEVENT_LEAVE data1=0 data2=0)

gridstop
Inserter
Inserter
Posts: 47
Joined: Sun Jul 17, 2016 1:46 am
Contact:

Re: [raiguard] [2.0.10] Alt + Click not registering on Linux

Post by gridstop »

For cinnamon users,

Open System Settings, click the 'Window' icon, then go the Behavior tab.
Change the "Special key to move and resize windows" from Alt to something else, like Super (the windows key) or just disable it.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 569
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard] [2.0.10] Alt + Click not registering on Linux

Post by raiguard »

Thanks for all of your reports. This is 100% the fault of your desktop environments / window managers and/or SDL. Moving to "won't fix".

The fact that some DEs take alt+click is baffling to me. There's a super key right there!
Don't forget, you're here forever.

wahming
Fast Inserter
Fast Inserter
Posts: 192
Joined: Sun May 17, 2015 8:30 pm
Contact:

Re: [raiguard] [2.0.10] Alt + Click not registering on Linux

Post by wahming »

gridstop wrote:
Thu Oct 31, 2024 1:49 pm
For cinnamon users,

Open System Settings, click the 'Window' icon, then go the Behavior tab.
Change the "Special key to move and resize windows" from Alt to something else, like Super (the windows key) or just disable it.
Thanks, this became very relevant with Factoriopedia. I suspect there's probably a lot of Linux users suffering from it.

Post Reply

Return to “Won't fix.”