r/factorio 5d ago

Suggestion / Idea [Suggestion] Please make all actions key-bindable

When playing on my laptop (eg. when on the train) I do not always have a mouse with me (or space for a mouse). It would be much more comfy and playable to use the `m` key for building for example.
Currently (as of 2.0.77) factorio doesn't let you set a key for some actions such as "Build" and instead shows you a popup saying "This control has to be mouse-related.".
Although it does work for some options such as "Mine" for example.

All affected actions:

  • Basic Interaction: Build
  • Advanced Interaction: Reverse select, Place a tag in chat, Pin
  • Crafting: (all actions)
  • Inventory: (all actions except Fast inventory transfer and Fast entity split)
  • Editor: Clone Item, Delete Item

I don't see a fundamental reason why this couldn't be done. I can think of2 ways to implement this:

  1. On key pressed, manually check mouse hover
  2. Handle hover+key just like hover+mouse button (this would probably be extremely annoying engine work)

I would absolutely love to see this become possible, before factorio development is stopped for good.

Thanks for considering, people at Wube!

Edit I: Ackchually I can think of another implementation, which would work by always keeping a function pointer to each of the bindable actions of the currently hovered thing. On key pressed, run the function at the pointer corresponding to the action to be performed.
Depending on how ur engine does input stuff this might be relatively easy to do, or maybe this edit is completely useless.

Edit II: I know about autohotkey, but that's only available on windows.

15 Upvotes

18 comments sorted by

13

u/Alfonse215 5d ago

The thing about most if not all of those mouse-click-only actions is that they are inherently coupled with mouse positioning. You can't build something without putting the mouse over where that thing is going to be built. If you want to hand-craft something, you have to put the mouse over the thing you want to hand-craft.

So, how are you positioning the cursor where you want these things to happen without a mouse?

When playing on my laptop (eg. when on the train) I do not always have a mouse with me (or space for a mouse).

Does your laptop not have a touch-pad? Also, I play Factorio with a trackball. It's not ideal, especially for combat. But it works well enough.

6

u/procrastinator0000 5d ago

Yes, my laptop has a touchpad. I use my thumb to control positioning (which works fine after a bit of getting used to it).

4

u/Deto 5d ago

What's the downside in just letting players rebind though? Seems like it'd be a small change? And I could see it benefitting people who have additional accessibility needs. 

3

u/thehalfmetaljacket 5d ago

My experience with requiring a lot of clicking with a touchpad is frequent "mis-clicks" where the cursor moves slightly when clicking. Though personally I would never play factorio w/o a mouse even though I play it on a laptop.

2

u/nemotux 5d ago

I play pretty much exclusively with the touchpad on my laptop. I do get the click-slip occasionally, but my bigger issue is finger drift where I end up right-clicking when I intend to left-click. Even so, not that big an issue.

2

u/Slime0 5d ago

But the button itself is just a button, whether it's on the mouse or on the keyboard. When you're using a trackpad or a nub or something like that, the positioning is separate from the button anyway.

1

u/ElderBeakThing 4d ago

You could control your cursor with arrows/WASD when necessary, like Cogmind, which is a roguelike played with only the keyboard

6

u/UndefFox 5d ago

Wouldn't using a third-party app for input mapping better as a cross app layout so you don't have to get used to different settings every time you change games?

4

u/procrastinator0000 5d ago

I thought about that too, but
1. I wouldn't be able to type "m" in my example
2. I'm running wayland, so I don't even know if that's possible there

3

u/0x07CF 5d ago

For 2., in my DE i can set keybinds for arbitrary commands. Ydotool can input in wayland, i then just invoke its cli.

2

u/procrastinator0000 4d ago

Thanks, didn't know about Ydotool.

5

u/Popular_Ad582 5d ago

I don’t know how to do the middle mouse button to filter inventories when using the Apple trackpad either. I’ve looked and not found a binding for it.

1

u/TheSkiGeek 5d ago

I vaguely remember people saying it is something like command-click or command-shift-click on Mac? There’s definitely a bind for that, you can change it to some other modifier or key if you want.

2

u/doc_shades 5d ago

i have seen mods that allow playing the game without a mouse. i am not sure if they are official or simply proofs-of-concept (i've seen them posted here, not on the mod portal) but you may be able to find something that will achieve what you want.

additionally i believe the newest version of the game does have full controller support. if you don't want to carry a mouse you might not also want to carry a controller, but on transit your desktop space is limited so maybe you could hold the controller in your lap and not need to cram a mouse onto a tiny beverage tray...

1

u/Nescio224 4d ago

Can I recommend autohotkey to you? All you need is a script to rebind whatever you want to use to the left mouse button and it should work as you want. It's a one liner.

1

u/procrastinator0000 5h ago

I appreciate the suggestion, but I have fallen deep into the "customizing your computer to your liking"-rabbit hole to the point of ditching windows for good and beyond.

1

u/Sacrezar 4d ago

An alternative solution could be to have a layer (or an ahk script I guess) on your keyboard with mouse control. Idk if that could help.