Read if controls have keys bound to them in locale or in general

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Osmo
Filter Inserter
Filter Inserter
Posts: 255
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Read if controls have keys bound to them in locale or in general

Post by Osmo »

Some UI elements in base game have tooltips like this:
изображение.png
изображение.png (39.92 KiB) Viewed 147 times
If i unbind the control from the settings, it is displayed like this:
изображение.png
изображение.png (36.55 KiB) Viewed 147 times
I have a similar UI, but as far as i know, there is no way to read the state of keybinds, so the only option is to always show them via rich text, which looks like this:
изображение.png
изображение.png (14.68 KiB) Viewed 147 times
This adds unnecessary clutter on every button. In a tooltip, its kind of not too ugly, but that's already a compromise, ideally it'd be displayed alongside the button text, but that'd look bad if most of them are not set.

While there are some usecases to just being able to read currently bound keys, if this worked similar to locale pluralization (which only works on numbers currently) that'd also be enough for my usecase
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 470
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Read if controls have keys bound to them in locale or in general

Post by protocol_1903 »

+1
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
Post Reply

Return to “Modding interface requests”