Factorio-Access / FactorioAccess

An accessibility mod for the video game Factorio, making the game accessible to the blind and visually impaired.
Other
20 stars 9 forks source link

move anything that "deletes" to the delete key #241

Open ahicks92 opened 3 weeks ago

ahicks92 commented 3 weeks ago

Maybe we need to keep other keystrokes for this, but if so we can bring this all down to one key in the alternate as well. We have a lot of things that look like delete which are all completely disjoint. The delete key does this, save for "superghost mining" which would probably fit on shift+delete. This would give us back at least a few keys and move things to somewhere sensible. My candidate list:

As far as I can tell the set is completely 100% disjoint and also doesn't care what's in the hand even, though I will say that we should not use our old way of having multiple prototypes to handle this

The advantage here isn't that delete is usually an ergonomic key because even on traditional keyboards it's a little out of the way. The advantage is that it's very easy to teach use delete for delete-like things. There's other obvious extensions as well: zero a signal in a constant combinator for example. But in any case, once the player learns early on that delete deletes, it's the sort of thing they'll probably try later. Also for myself despite being a mod dev, I sometimes have to play "which keystrokes delete" because the infrequency of the action matches the ergonomics of just using the delete key excepting that we didn't (we have what, at least 3 just counting things "on the ground").

Maybe the alternate mapping is backspace. I don't think we use that. It also "feels like deleting" and is a bit more ergonomic plus on all keyboards including weird laptop ones.

LevFendi commented 2 weeks ago
ahicks92 commented 2 weeks ago

So careful on that confirmation bit. We don't really have the ability to know if a second key was pressed between delete presses unless you're going to instrument literally every single event by hand.

I actually want to genericize that kind of thing because for example we talked yesterday about two-press train building and at that point we really need to know if it's the nth press within a timeout. But obviously we don't have that yet. If you're going to instrument every event by hand perhaps you want to handle it: register custom events with another module and have that module maintain a running history with timestamps.