[1.0.0] Options screen recognizes input sent by xdotool, but bound keys do not work in-game

Bugs that are actually features.
Post Reply
Foxite
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Dec 09, 2016 9:09 pm
Contact:

[1.0.0] Options screen recognizes input sent by xdotool, but bound keys do not work in-game

Post by Foxite »

Background:
I have a gaming mouse with several extra buttons, and the vendor has decided it's not worth porting their configuration software to Linux. This prevents me from changing the button bindings without rebooting into Windows. To solve this problem I assigned all buttons to single keypresses from 'a' to 'v' sequentially, and I wrote a program that grabs the keyboard input from the mouse, and responds to keypresses by executing predefined commands. It works quite well, and in fact it makes my mouse a much more powerful tool than what the vendor can give me, because it can make any button do literally anything.

Bug report:
I mapped mouse buttons 4 and 5 to 'xdotool click 8' and 'xdotool click 9' respectively, which simulates the standard button presses. This setup works fine everywhere, at least in standard desktop apps (Factorio is the first game where I tried to use these buttons). When changing the controls in Factorio, I can use those buttons fine (the input bindings will be changed to the correct mouse button). However when I go in game and press the buttons, the game doesn't seem to recognize the inputs.

I thought the game doesn't properly see button presses that happen very quickly, possibly entirely within the time between updates, as a simulated button press might be. I tried to change my program to execute 'xdotool mousedown 8' and 'xdotool mouseup 8' when the buttons are pressed and released, respectively, but that didn't work.

Info:
My computer runs Arch Linux, with XOrg and KDE as my desktop environment. My kernel is linux-lts.

Link to the program, if you're curious

Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [1.0.0] Options screen recognizes input sent by xdotool, but bound keys do not work in-game

Post by Oxyd »

Seems to work for me. What controls did you bind those inputs to? And what does Factorio call these buttons in the controls screen once bound? I get “Mouse button 4” for xdotool click 8.

Foxite
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Dec 09, 2016 9:09 pm
Contact:

Re: [1.0.0] Options screen recognizes input sent by xdotool, but bound keys do not work in-game

Post by Foxite »

I have identified some issues with my program. Long story short, it works properly now, even in Factorio, although now I'm not sure how it was working properly outside of Factorio yesterday.

This report may be closed as invalid.

Post Reply

Return to “Not a bug”